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/commands/prop_values.h b/buffet/commands/prop_values.h
index b408f0d..f568dd8 100644
--- a/buffet/commands/prop_values.h
+++ b/buffet/commands/prop_values.h
@@ -9,9 +9,10 @@
 #include <memory>
 #include <string>
 
+#include <chromeos/error.h>
+
 #include "buffet/any.h"
 #include "buffet/commands/schema_utils.h"
-#include "buffet/error.h"
 
 namespace base {
 class Value;
@@ -93,12 +94,13 @@
   // Saves the value as a JSON object.
   // If it fails, returns nullptr value and fills in the details for the
   // failure in the |error| parameter.
-  virtual std::unique_ptr<base::Value> ToJson(ErrorPtr* error) const = 0;
+  virtual std::unique_ptr<base::Value> ToJson(
+      chromeos::ErrorPtr* error) const = 0;
   // Parses a value from JSON.
   // If it fails, it returns false and provides additional information
   // via the |error| parameter.
   virtual bool FromJson(const base::Value* value,
-                        ErrorPtr* error) = 0;
+                        chromeos::ErrorPtr* error) = 0;
 
   // Returns the contained C++ value as Any.
   virtual Any GetValueAsAny() const = 0;
@@ -129,12 +131,12 @@
     return std::make_shared<Derived>(*static_cast<const Derived*>(this));
   }
 
-  std::unique_ptr<base::Value> ToJson(ErrorPtr* error) const override {
+  std::unique_ptr<base::Value> ToJson(
+      chromeos::ErrorPtr* error) const override {
     return TypedValueToJson(value_, error);
   }
 
-  bool FromJson(const base::Value* value,
-                        ErrorPtr* error) override {
+  bool FromJson(const base::Value* value, chromeos::ErrorPtr* error) override {
     return TypedValueFromJson(value, GetPropType()->GetObjectSchemaPtr(),
                               &value_, error);
   }