platform2: Move Error class from Buffet to libchromeos

Moved buffet::Error class and related facilities to
libchromeos and changed the namespace to 'chromeos::'.
Updated a bunch of code to include the header files
from the new location and referring to the new
namespace.

BUG=chromium:403604
TEST=USE=buffet ./build_packages
     FEATURES=test emerge-link libchromeos
     USE=buffet FEATURES=test emerge-link platform2

Change-Id: I0b5b37ccd7ee3b7be9467ebfae5d172d9b057cf6
Reviewed-on: https://chromium-review.googlesource.com/212525
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/http_request.h b/buffet/http_request.h
index 9bb436e..d9e73a4 100644
--- a/buffet/http_request.h
+++ b/buffet/http_request.h
@@ -13,8 +13,8 @@
 #include <vector>
 
 #include <base/basictypes.h>
+#include <chromeos/error.h>
 
-#include "buffet/error.h"
 #include "buffet/http_connection.h"
 #include "buffet/http_transport.h"
 
@@ -235,7 +235,7 @@
   void RemoveHeader(const char* header);
 
   // Adds a request body. This is not to be used with GET method
-  bool AddRequestBody(const void* data, size_t size, ErrorPtr* error);
+  bool AddRequestBody(const void* data, size_t size, chromeos::ErrorPtr* error);
 
   // Makes a request for a subrange of data. Specifies a partial range with
   // either from beginning of the data to the specified offset (if |bytes| is
@@ -264,11 +264,11 @@
   // In case the server couldn't be reached for whatever reason, returns
   // empty unique_ptr (null). In such a case, the additional error information
   // can be returned through the optional supplied |error| parameter.
-  std::unique_ptr<Response> GetResponse(ErrorPtr* error);
+  std::unique_ptr<Response> GetResponse(chromeos::ErrorPtr* error);
 
  private:
   // Helper function to create an http::Connection and send off request headers.
-  bool SendRequestIfNeeded(ErrorPtr* error);
+  bool SendRequestIfNeeded(chromeos::ErrorPtr* error);
 
   // Implementation that provides particular HTTP transport.
   std::shared_ptr<Transport> transport_;