diff --git a/Makefile b/Makefile
index 75a2d94..07a15c6 100644
--- a/Makefile
+++ b/Makefile
@@ -448,7 +448,6 @@
 	profile_dbus_property_exporter_unittest.o \
 	profile_unittest.o \
 	property_accessor_unittest.o \
-	property_store_inspector.o \
 	property_store_unittest.o \
 	resolver_unittest.o \
 	routing_table_unittest.o \
diff --git a/l2tp_ipsec_driver_unittest.cc b/l2tp_ipsec_driver_unittest.cc
index cf4a297..9c20ce4 100644
--- a/l2tp_ipsec_driver_unittest.cc
+++ b/l2tp_ipsec_driver_unittest.cc
@@ -20,7 +20,6 @@
 #include "shill/mock_process_killer.h"
 #include "shill/mock_vpn.h"
 #include "shill/mock_vpn_service.h"
-#include "shill/property_store_inspector.h"
 #include "shill/vpn.h"
 
 using std::find;
@@ -474,12 +473,12 @@
 TEST_F(L2TPIPSecDriverTest, GetProvider) {
   PropertyStore store;
   driver_->InitPropertyStore(&store);
-  PropertyStoreInspector inspector(&store);
   {
     KeyValueStore props;
+    Error error;
     EXPECT_TRUE(
-        inspector.GetKeyValueStoreProperty(
-            flimflam::kProviderProperty, &props));
+        store.GetKeyValueStoreProperty(
+            flimflam::kProviderProperty, &props, &error));
     EXPECT_TRUE(props.LookupBool(flimflam::kPassphraseRequiredProperty, false));
     EXPECT_TRUE(
         props.LookupBool(flimflam::kL2tpIpsecPskRequiredProperty, false));
@@ -488,9 +487,10 @@
     KeyValueStore props;
     SetArg(flimflam::kL2tpIpsecPasswordProperty, "random-password");
     SetArg(flimflam::kL2tpIpsecPskProperty, "random-psk");
+    Error error;
     EXPECT_TRUE(
-        inspector.GetKeyValueStoreProperty(
-            flimflam::kProviderProperty, &props));
+        store.GetKeyValueStoreProperty(
+            flimflam::kProviderProperty, &props, &error));
     EXPECT_FALSE(props.LookupBool(flimflam::kPassphraseRequiredProperty, true));
     EXPECT_FALSE(
         props.LookupBool(flimflam::kL2tpIpsecPskRequiredProperty, true));
diff --git a/openvpn_driver_unittest.cc b/openvpn_driver_unittest.cc
index eff0db8..8e84d5e 100644
--- a/openvpn_driver_unittest.cc
+++ b/openvpn_driver_unittest.cc
@@ -29,7 +29,6 @@
 #include "shill/mock_vpn.h"
 #include "shill/mock_vpn_service.h"
 #include "shill/nice_mock_control.h"
-#include "shill/property_store_inspector.h"
 #include "shill/rpc_task.h"
 #include "shill/vpn.h"
 #include "shill/vpn_service.h"
@@ -915,20 +914,21 @@
 TEST_F(OpenVPNDriverTest, GetProvider) {
   PropertyStore store;
   driver_->InitPropertyStore(&store);
-  PropertyStoreInspector inspector(&store);
   {
     KeyValueStore props;
+    Error error;
     EXPECT_TRUE(
-        inspector.GetKeyValueStoreProperty(
-            flimflam::kProviderProperty, &props));
+        store.GetKeyValueStoreProperty(
+            flimflam::kProviderProperty, &props, &error));
     EXPECT_TRUE(props.LookupBool(flimflam::kPassphraseRequiredProperty, false));
   }
   {
     KeyValueStore props;
     SetArg(flimflam::kOpenVPNPasswordProperty, "random-password");
+    Error error;
     EXPECT_TRUE(
-        inspector.GetKeyValueStoreProperty(
-            flimflam::kProviderProperty, &props));
+        store.GetKeyValueStoreProperty(
+            flimflam::kProviderProperty, &props, &error));
     EXPECT_FALSE(props.LookupBool(flimflam::kPassphraseRequiredProperty, true));
     EXPECT_FALSE(props.ContainsString(flimflam::kOpenVPNPasswordProperty));
   }
diff --git a/property_store.cc b/property_store.cc
index bb1a87c..6b2e449 100644
--- a/property_store.cc
+++ b/property_store.cc
@@ -42,6 +42,88 @@
           ContainsKey(rpc_identifiers_properties_, prop));
 }
 
+bool PropertyStore::GetBoolProperty(const string &name,
+                                    bool *value,
+                                    Error *error) const {
+  return GetProperty(name, value, error, bool_properties_, "a bool");
+}
+
+bool PropertyStore::GetInt16Property(const string &name,
+                                     int16 *value,
+                                     Error *error) const {
+  return GetProperty(name, value, error, int16_properties_, "an int16");
+}
+
+bool PropertyStore::GetInt32Property(const string &name,
+                                     int32 *value,
+                                     Error *error) const {
+  return GetProperty(name, value, error, int32_properties_, "an int32");
+}
+
+bool PropertyStore::GetKeyValueStoreProperty(const string &name,
+                                             KeyValueStore *value,
+                                             Error *error) const {
+  return GetProperty(name, value, error, key_value_store_properties_,
+                     "a key value store");
+}
+
+bool PropertyStore::GetRpcIdentifierProperty(const string &name,
+                                             RpcIdentifier *value,
+                                             Error *error) const {
+  return GetProperty(name, value, error, rpc_identifier_properties_,
+                     "an rpc_identifier");
+}
+
+bool PropertyStore::GetStringProperty(const string &name,
+                                      string *value,
+                                      Error *error) const {
+  return GetProperty(name, value, error, string_properties_, "a string");
+}
+
+bool PropertyStore::GetStringmapProperty(const string &name,
+                                         Stringmap *values,
+                                         Error *error) const {
+  return GetProperty(name, values, error, stringmap_properties_,
+                     "a string map");
+}
+
+bool PropertyStore::GetStringmapsProperty(const string &name,
+                                          Stringmaps *values,
+                                          Error *error) const {
+  return GetProperty(name, values, error, stringmaps_properties_,
+                     "a string map list");
+}
+
+bool PropertyStore::GetStringsProperty(const string &name,
+                                       Strings *values,
+                                       Error *error) const {
+  return GetProperty(name, values, error, strings_properties_, "a string list");
+}
+
+bool PropertyStore::GetUint8Property(const string &name,
+                                     uint8 *value,
+                                     Error *error) const {
+  return GetProperty(name, value, error, uint8_properties_, "a uint8");
+}
+
+bool PropertyStore::GetUint16Property(const string &name,
+                                      uint16 *value,
+                                      Error *error) const {
+  return GetProperty(name, value, error, uint16_properties_, "a uint16");
+}
+
+bool PropertyStore::GetUint32Property(const string &name,
+                                      uint32 *value,
+                                      Error *error) const {
+  return GetProperty(name, value, error, uint32_properties_, "a uint32");
+}
+
+bool PropertyStore::GetUint64Property(const string &name,
+                                      uint64 *value,
+                                      Error *error) const {
+  return GetProperty(name, value, error, uint64_properties_, "a uint64");
+}
+
 bool PropertyStore::SetBoolProperty(const string &name,
                                     bool value,
                                     Error *error) {
@@ -500,6 +582,36 @@
 // private methods
 
 template <class V>
+bool PropertyStore::GetProperty(
+    const string &name,
+    V *value,
+    Error *error,
+    const map< string, std::tr1::shared_ptr<
+        AccessorInterface<V> > >&collection,
+    const string &value_type_english) const {
+  SLOG(Property, 2) << "Getting " << name << " as " << value_type_english
+                    << ".";
+  typename map< string, std::tr1::shared_ptr<
+      AccessorInterface<V> > >::const_iterator it = collection.find(name);
+  if (it != collection.end()) {
+    V val = it->second->Get(error);
+    if (error->IsSuccess()) {
+      *value = val;
+    }
+  } else {
+    if (Contains(name)) {
+      error->Populate(
+          Error::kInvalidArguments,
+          "Property " + name + " is not " + value_type_english + ".");
+    } else {
+      error->Populate(
+          Error::kInvalidProperty, "Property " + name + " does not exist.");
+    }
+  }
+  return error->IsSuccess();
+};
+
+template <class V>
 bool PropertyStore::SetProperty(
     const string &name,
     const V &value,
diff --git a/property_store.h b/property_store.h
index 829dcc4..56ade72 100644
--- a/property_store.h
+++ b/property_store.h
@@ -25,6 +25,37 @@
 
   virtual bool Contains(const std::string& property) const;
 
+  // Methods to allow the getting of properties stored in the referenced
+  // |store_| by name. Upon success, these methods return true and return the
+  // property value in |value|. Upon failure, they return false and
+  // leave |value| untouched.
+  bool GetBoolProperty(const std::string &name, bool *value,
+                       Error *error) const;
+  bool GetInt16Property(const std::string &name, int16 *value,
+                        Error *error) const;
+  bool GetInt32Property(const std::string &name, int32 *value,
+                        Error *error) const;
+  bool GetKeyValueStoreProperty(const std::string &name, KeyValueStore *value,
+                                Error *error) const;
+  bool GetStringProperty(const std::string &name, std::string *value,
+                         Error *error) const;
+  bool GetStringmapProperty(const std::string &name, Stringmap *values,
+                            Error *error) const;
+  bool GetStringmapsProperty(const std::string &name, Stringmaps *values,
+                             Error *error) const;
+  bool GetStringsProperty(const std::string &name, Strings *values,
+                          Error *error) const;
+  bool GetUint8Property(const std::string &name, uint8 *value,
+                        Error *error) const;
+  bool GetUint16Property(const std::string &name, uint16 *value,
+                         Error *error) const;
+  bool GetUint32Property(const std::string &name, uint32 *value,
+                         Error *error) const;
+  bool GetUint64Property(const std::string &name, uint64 *value,
+                         Error *error) const;
+  bool GetRpcIdentifierProperty(const std::string &name, RpcIdentifier *value,
+                                Error *error) const;
+
   // Methods to allow the setting, by name, of properties stored in this object.
   // The property names are declared in chromeos/dbus/service_constants.h,
   // so that they may be shared with libcros.
@@ -90,11 +121,6 @@
   // Otherwrise, |error| is unchanged, and the method returns true.
   virtual bool ClearProperty(const std::string &name, Error *error);
 
-  // We do not provide methods for reading individual properties,
-  // because we don't need them to implement the flimflam API. (The flimflam
-  // API only allows fetching all properties at once -- not individual
-  // properties.)
-
   // Accessors for iterators over property maps. Useful for dumping all
   // properties.
   ReadablePropertyConstIterator<bool> GetBoolPropertiesIter() const;
@@ -182,6 +208,15 @@
 
  private:
   template <class V>
+  bool GetProperty(
+      const std::string &name,
+      V *value,
+      Error *error,
+      const std::map< std::string, std::tr1::shared_ptr<
+          AccessorInterface<V> > > &collection,
+      const std::string &value_type_english) const;
+
+  template <class V>
   bool SetProperty(
       const std::string &name,
       const V &value,
diff --git a/property_store_inspector.cc b/property_store_inspector.cc
deleted file mode 100644
index d057d99..0000000
--- a/property_store_inspector.cc
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "shill/property_store_inspector.h"
-
-using std::map;
-using std::string;
-using std::vector;
-
-namespace shill {
-
-PropertyStoreInspector::PropertyStoreInspector() : store_(NULL) {}
-
-PropertyStoreInspector::PropertyStoreInspector(const PropertyStore *store)
-    : store_(store) {}
-
-PropertyStoreInspector::~PropertyStoreInspector() {}
-
-bool PropertyStoreInspector::GetBoolProperty(const string &name, bool *value) {
-  return GetProperty(name, value, &PropertyStore::GetBoolPropertiesIter);
-}
-
-bool PropertyStoreInspector::GetInt16Property(const string &name,
-                                              int16 *value) {
-  return GetProperty(name, value, &PropertyStore::GetInt16PropertiesIter);
-}
-
-bool PropertyStoreInspector::GetInt32Property(const string &name,
-                                              int32 *value) {
-  return GetProperty(name, value, &PropertyStore::GetInt32PropertiesIter);
-}
-
-bool PropertyStoreInspector::GetKeyValueStoreProperty(const string &name,
-                                                      KeyValueStore *value) {
-  return GetProperty(name, value,
-                     &PropertyStore::GetKeyValueStorePropertiesIter);
-}
-
-bool PropertyStoreInspector::GetStringProperty(const string &name,
-                                               string *value) {
-  return GetProperty(name, value, &PropertyStore::GetStringPropertiesIter);
-}
-
-bool PropertyStoreInspector::GetStringmapProperty(const string &name,
-                                                  map<string, string> *values) {
-  return GetProperty(name, values, &PropertyStore::GetStringmapPropertiesIter);
-}
-
-bool PropertyStoreInspector::GetStringsProperty(const string &name,
-                                                vector<string> *values) {
-  return GetProperty(name, values, &PropertyStore::GetStringsPropertiesIter);
-}
-
-bool PropertyStoreInspector::GetUint8Property(const string &name,
-                                              uint8 *value) {
-  return GetProperty(name, value, &PropertyStore::GetUint8PropertiesIter);
-}
-
-bool PropertyStoreInspector::GetUint16Property(const string &name,
-                                               uint16 *value) {
-  return GetProperty(name, value, &PropertyStore::GetUint16PropertiesIter);
-}
-
-bool PropertyStoreInspector::GetUint32Property(const string &name,
-                                               uint32 *value) {
-  return GetProperty(name, value, &PropertyStore::GetUint32PropertiesIter);
-}
-
-bool PropertyStoreInspector::GetRpcIdentifierProperty(const string &name,
-                                                      RpcIdentifier *value) {
-  return GetProperty(name, value,
-                     &PropertyStore::GetRpcIdentifierPropertiesIter);
-}
-
-template <class V>
-bool PropertyStoreInspector::GetProperty(
-    const string &name,
-    V *value,
-    ReadablePropertyConstIterator<V>(PropertyStore::*getter)() const) {
-  for (ReadablePropertyConstIterator<V> it = ((*store_).*getter)();
-       !it.AtEnd(); it.Advance()) {
-    if (it.Key() == name) {
-      if (value) {
-        *value = it.value();
-      }
-      return true;
-    }
-  }
-  return false;
-};
-
-}  // namespace shill
diff --git a/property_store_inspector.h b/property_store_inspector.h
deleted file mode 100644
index b29a9dc..0000000
--- a/property_store_inspector.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SHILL_PROPERTY_STORE_INSPECTOR_H_
-#define SHILL_PROPERTY_STORE_INSPECTOR_H_
-
-#ifndef UNIT_TEST
-#error "Do not use PropertyStoreInspector in non-test code."
-#endif
-
-#include "shill/property_store.h"
-
-namespace shill {
-
-// This class supplies functions to unit tests for inspecting a PropertyStore
-// class to get single attributes.  We never need to do this in the real
-// PropertyStore, since the only interface to it over the control API is
-// "GetProperties" which iterates over the entire store's properties.
-//
-// This code is done inefficiently -- if we were ever meant to retrieve
-// single properties in production code, we'd access the map directly.
-// For this reason, this class should only be used in unit tests.
-class PropertyStoreInspector {
- public:
-  PropertyStoreInspector();
-  explicit PropertyStoreInspector(const PropertyStore *store);
-  virtual ~PropertyStoreInspector();
-
-  const PropertyStore *store() const { return store_; }
-  void set_store(const PropertyStore *store) { store_ = store; }
-
-  // Methods to allow the getting of properties stored in the referenced
-  // |store_| by name. Upon success, these methods return true and return the
-  // property value in |value| if non-NULL. Upon failure, they return false and
-  // leave |value| untouched.
-  bool GetBoolProperty(const std::string &name, bool *value);
-  bool GetInt16Property(const std::string &name, int16 *value);
-  bool GetInt32Property(const std::string &name, int32 *value);
-  bool GetKeyValueStoreProperty(const std::string &name, KeyValueStore *value);
-  bool GetStringProperty(const std::string &name, std::string *value);
-  bool GetStringmapProperty(const std::string &name,
-                            std::map<std::string, std::string> *values);
-  bool GetStringsProperty(const std::string &name,
-                          std::vector<std::string> *values);
-  bool GetUint8Property(const std::string &name, uint8 *value);
-  bool GetUint16Property(const std::string &name, uint16 *value);
-  bool GetUint32Property(const std::string &name, uint32 *value);
-  bool GetRpcIdentifierProperty(const std::string &name, RpcIdentifier *value);
-
- private:
-  template <class V>
-  bool GetProperty(
-      const std::string &name,
-      V *value,
-      ReadablePropertyConstIterator<V>(PropertyStore::*getter)() const);
-
-  const PropertyStore *store_;
-
-  DISALLOW_COPY_AND_ASSIGN(PropertyStoreInspector);
-};
-
-}  // namespace shill
-
-
-#endif  // SHILL_PROPERTY_STORE_INSPECTOR_H_
diff --git a/property_store_unittest.cc b/property_store_unittest.cc
index 79239d0..8fa059a 100644
--- a/property_store_unittest.cc
+++ b/property_store_unittest.cc
@@ -247,6 +247,14 @@
     EXPECT_TRUE(values[1] == it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetBoolProperty(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    bool test_value;
+    EXPECT_TRUE(store.GetBoolProperty(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
   {
     const string keys[] = {"int16p1", "int16p2"};
@@ -260,6 +268,14 @@
     EXPECT_EQ(values[1], it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetInt16Property(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    int16 test_value;
+    EXPECT_TRUE(store.GetInt16Property(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
   {
     const string keys[] = {"int32p1", "int32p2"};
@@ -273,6 +289,14 @@
     EXPECT_EQ(values[1], it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetInt32Property(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    int32 test_value;
+    EXPECT_TRUE(store.GetInt32Property(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
   {
     const string keys[] = {"stringp1", "stringp2"};
@@ -286,6 +310,14 @@
     EXPECT_EQ(values[1], it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetStringProperty(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    string test_value;
+    EXPECT_TRUE(store.GetStringProperty(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
   {
     const string keys[] = {"stringmapp1", "stringmapp2"};
@@ -302,6 +334,14 @@
     EXPECT_TRUE(values[1] == it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetStringmapProperty(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    Stringmap test_value;
+    EXPECT_TRUE(store.GetStringmapProperty(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_TRUE(values[1] == test_value);
   }
   {
     const string keys[] = {"stringmapsp1", "stringmapsp2"};
@@ -322,6 +362,14 @@
     EXPECT_TRUE(values[1] == it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetStringmapsProperty(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    Stringmaps test_value;
+    EXPECT_TRUE(store.GetStringmapsProperty(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_TRUE(values[1] == test_value);
   }
   {
     const string keys[] = {"stringsp1", "stringsp2"};
@@ -341,6 +389,14 @@
     EXPECT_TRUE(values[1] == it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetStringsProperty(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    Strings test_value;
+    EXPECT_TRUE(store.GetStringsProperty(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_TRUE(values[1] == test_value);
   }
   {
     const string keys[] = {"uint8p1", "uint8p2"};
@@ -354,6 +410,14 @@
     EXPECT_EQ(values[1], it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetUint8Property(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    uint8 test_value;
+    EXPECT_TRUE(store.GetUint8Property(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
   {
     const string keys[] = {"uint16p", "uint16p1"};
@@ -367,6 +431,14 @@
     EXPECT_EQ(values[1], it.value());
     it.Advance();
     EXPECT_TRUE(it.AtEnd());
+
+    Error errors[2];
+    EXPECT_FALSE(store.GetUint16Property(keys[0], NULL, &errors[0]));
+    EXPECT_EQ(Error::kPermissionDenied, errors[0].type());
+    uint16 test_value;
+    EXPECT_TRUE(store.GetUint16Property(keys[1], &test_value, &errors[1]));
+    EXPECT_TRUE(errors[1].IsSuccess());
+    EXPECT_EQ(values[1], test_value);
   }
 }
 
diff --git a/service_unittest.cc b/service_unittest.cc
index 3b48932..08b4cd8 100644
--- a/service_unittest.cc
+++ b/service_unittest.cc
@@ -31,7 +31,6 @@
 #include "shill/mock_proxy_factory.h"
 #include "shill/mock_store.h"
 #include "shill/mock_time.h"
-#include "shill/property_store_inspector.h"
 #include "shill/property_store_unittest.h"
 #include "shill/service_under_test.h"
 
@@ -878,8 +877,9 @@
 class ReadOnlyServicePropertyTest : public ServiceTest {};
 TEST_P(ReadOnlyServicePropertyTest, PropertyWriteOnly) {
   string property(GetParam().reader().get_string());
-  PropertyStoreInspector inspector(&service_->store());
-  EXPECT_FALSE(inspector.GetStringProperty(property, NULL));
+  Error error;
+  EXPECT_FALSE(service_->store().GetStringProperty(property, NULL, &error));
+  EXPECT_EQ(Error::kPermissionDenied, error.type());
 }
 
 INSTANTIATE_TEST_CASE_P(
@@ -1231,18 +1231,18 @@
 TEST_F(ServiceTest, DiagnosticsProperties) {
   const string kWallClock0 = "2012-12-09T12:41:22.234567-0800";
   const string kWallClock1 = "2012-12-31T23:59:59.345678-0800";
-  PropertyStoreInspector inspector(&service_->store());
   Strings values;
 
   PushTimestamp(GetDisconnects(), 0, kWallClock0);
-  ASSERT_TRUE(
-      inspector.GetStringsProperty(kDiagnosticsDisconnectsProperty, &values));
+  Error unused_error;
+  ASSERT_TRUE(service_->store().GetStringsProperty(
+     kDiagnosticsDisconnectsProperty, &values, &unused_error));
   ASSERT_EQ(1, values.size());
   EXPECT_EQ(kWallClock0, values[0]);
 
   PushTimestamp(GetMisconnects(), 0, kWallClock1);
-  ASSERT_TRUE(
-      inspector.GetStringsProperty(kDiagnosticsMisconnectsProperty, &values));
+  ASSERT_TRUE(service_->store().GetStringsProperty(
+      kDiagnosticsMisconnectsProperty, &values, &unused_error));
   ASSERT_EQ(1, values.size());
   EXPECT_EQ(kWallClock1, values[0]);
 }
diff --git a/static_ip_parameters_unittest.cc b/static_ip_parameters_unittest.cc
index 649f5fe..88acf91 100644
--- a/static_ip_parameters_unittest.cc
+++ b/static_ip_parameters_unittest.cc
@@ -10,7 +10,6 @@
 #include "shill/ipconfig.h"
 #include "shill/mock_store.h"
 #include "shill/property_store.h"
-#include "shill/property_store_inspector.h"
 
 using std::string;
 using std::vector;
@@ -116,21 +115,30 @@
   EXPECT_EQ(kTestAddress, props.address);
   EXPECT_EQ(kTestMtu, props.mtu);
 
-  PropertyStoreInspector inspector(&store);
-  EXPECT_FALSE(inspector.GetStringProperty("StaticIP.Address", NULL));
+  {
+    Error error;
+    EXPECT_FALSE(store.GetStringProperty("StaticIP.Address", NULL, &error));
+    EXPECT_EQ(Error::kNotFound, error.type());
+  }
   string string_value;
-  EXPECT_TRUE(inspector.GetStringProperty("StaticIP.Gateway", &string_value));
+  Error unused_error;
+  EXPECT_TRUE(store.GetStringProperty("StaticIP.Gateway", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kGateway, string_value);
-  EXPECT_FALSE(inspector.GetInt32Property("StaticIP.Mtu", NULL));
-  EXPECT_TRUE(inspector.GetStringProperty("StaticIP.NameServers",
-                                          &string_value));
+  {
+    Error error;
+    EXPECT_FALSE(store.GetInt32Property("StaticIP.Mtu", NULL, &error));
+    EXPECT_EQ(Error::kNotFound, error.type());
+  }
+  EXPECT_TRUE(store.GetStringProperty("StaticIP.NameServers", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kNameServers, string_value);
-  EXPECT_TRUE(inspector.GetStringProperty("StaticIP.PeerAddress",
-                                          &string_value));
+  EXPECT_TRUE(store.GetStringProperty("StaticIP.PeerAddress", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPeerAddress, string_value);
   int32 int_value;
-  EXPECT_TRUE(inspector.GetInt32Property("StaticIP.Prefixlen",
-                                         &int_value));
+  EXPECT_TRUE(store.GetInt32Property("StaticIP.Prefixlen", &int_value,
+                                     &unused_error));
   EXPECT_EQ(kPrefixLen, int_value);
 }
 
@@ -187,23 +195,26 @@
   Populate();
   static_params_.ApplyTo(&props_);
 
-  PropertyStoreInspector inspector(&store);
   string string_value;
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.Address", &string_value));
+  Error unused_error;
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.Address", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kAddress, string_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.Gateway", &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.Gateway", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kGateway, string_value);
   int32 int_value;
-  EXPECT_TRUE(inspector.GetInt32Property("SavedIP.Mtu", &int_value));
+  EXPECT_TRUE(store.GetInt32Property("SavedIP.Mtu", &int_value,
+                                     &unused_error));
   EXPECT_EQ(kMtu, int_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.NameServers",
-                                          &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.NameServers", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kNameServers, string_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.PeerAddress",
-                                          &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.PeerAddress", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPeerAddress, string_value);
-  EXPECT_TRUE(inspector.GetInt32Property("SavedIP.Prefixlen",
-                                         &int_value));
+  EXPECT_TRUE(store.GetInt32Property("SavedIP.Prefixlen", &int_value,
+                                     &unused_error));
   EXPECT_EQ(kPrefixLen, int_value);
 
   store.ClearProperty("StaticIP.Address", &error);
@@ -214,20 +225,23 @@
   store.ClearProperty("StaticIP.Prefixlen", &error);
 
   static_params_.ApplyTo(&props_);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.Address", &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.Address", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPrefix + kAddress, string_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.Gateway", &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.Gateway", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPrefix + kGateway, string_value);
-  EXPECT_TRUE(inspector.GetInt32Property("SavedIP.Mtu", &int_value));
+  EXPECT_TRUE(store.GetInt32Property("SavedIP.Mtu", &int_value,
+                                     &unused_error));
   EXPECT_EQ(kOffset + kMtu, int_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.NameServers",
-                                          &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.NameServers", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPrefix + kNameServers, string_value);
-  EXPECT_TRUE(inspector.GetStringProperty("SavedIP.PeerAddress",
-                                          &string_value));
+  EXPECT_TRUE(store.GetStringProperty("SavedIP.PeerAddress", &string_value,
+                                      &unused_error));
   EXPECT_EQ(kPrefix + kPeerAddress, string_value);
-  EXPECT_TRUE(inspector.GetInt32Property("SavedIP.Prefixlen",
-                                         &int_value));
+  EXPECT_TRUE(store.GetInt32Property("SavedIP.Prefixlen", &int_value,
+                                     &unused_error));
   EXPECT_EQ(kOffset + kPrefixLen, int_value);
 }
 
diff --git a/vpn_driver_unittest.cc b/vpn_driver_unittest.cc
index 83e2e61..fe221f3 100644
--- a/vpn_driver_unittest.cc
+++ b/vpn_driver_unittest.cc
@@ -21,7 +21,6 @@
 #include "shill/mock_store.h"
 #include "shill/nice_mock_control.h"
 #include "shill/property_store.h"
-#include "shill/property_store_inspector.h"
 
 using std::string;
 using testing::_;
@@ -116,10 +115,10 @@
 bool VPNDriverTest::GetProviderProperty(const PropertyStore &store,
                                         const string &key,
                                         string *value) {
-  PropertyStoreInspector inspector(&store);
   KeyValueStore provider_properties;
-  EXPECT_TRUE(inspector.GetKeyValueStoreProperty(
-      flimflam::kProviderProperty, &provider_properties));
+  Error error;
+  EXPECT_TRUE(store.GetKeyValueStoreProperty(
+      flimflam::kProviderProperty, &provider_properties, &error));
   if (!provider_properties.ContainsString(key)) {
     return false;
   }
@@ -208,10 +207,13 @@
   // KeyValueStore.
   PropertyStore store;
   driver_.InitPropertyStore(&store);
-  PropertyStoreInspector inspector(&store);
 
   // An un-set property should not be readable.
-  EXPECT_FALSE(inspector.GetStringProperty(kPortProperty, NULL));
+  {
+    Error error;
+    EXPECT_FALSE(store.GetStringProperty(kPortProperty, NULL, &error));
+    EXPECT_EQ(Error::kInvalidArguments, error.type());
+  }
   EXPECT_FALSE(GetProviderProperty(store, kPortProperty, NULL));
 
   const string kProviderName = "boo";
@@ -222,12 +224,18 @@
 
   // We should not be able to read a property out of the driver args using the
   // key to the args directly.
-  EXPECT_FALSE(inspector.GetStringProperty(kPortProperty, NULL));
+  {
+    Error error;
+    EXPECT_FALSE(store.GetStringProperty(kPortProperty, NULL, &error));
+    EXPECT_EQ(Error::kInvalidArguments, error.type());
+  }
 
   // We should instead be able to find it within the "Provider" stringmap.
-  string value;
-  EXPECT_TRUE(GetProviderProperty(store, kPortProperty, &value));
-  EXPECT_EQ(kPort, value);
+  {
+    string value;
+    EXPECT_TRUE(GetProviderProperty(store, kPortProperty, &value));
+    EXPECT_EQ(kPort, value);
+  }
 
   // We should be able to read empty properties from the "Provider" stringmap.
   {
@@ -238,8 +246,11 @@
 
   // Properties that start with the prefix "Provider." should be mapped to the
   // name in the Properties dict with the prefix removed.
-  EXPECT_TRUE(GetProviderProperty(store, flimflam::kNameProperty, &value));
-  EXPECT_EQ(kProviderName, value);
+  {
+    string value;
+    EXPECT_TRUE(GetProviderProperty(store, flimflam::kNameProperty, &value));
+    EXPECT_EQ(kProviderName, value);
+  }
 
   // If we clear a property, we should no longer be able to find it.
   {
diff --git a/wifi_unittest.cc b/wifi_unittest.cc
index c878539..6e26070 100644
--- a/wifi_unittest.cc
+++ b/wifi_unittest.cc
@@ -53,7 +53,6 @@
 #include "shill/mock_time.h"
 #include "shill/mock_wifi_service.h"
 #include "shill/nice_mock_control.h"
-#include "shill/property_store_inspector.h"
 #include "shill/property_store_unittest.h"
 #include "shill/proxy_factory.h"
 #include "shill/wifi_endpoint.h"
@@ -155,9 +154,9 @@
   EXPECT_TRUE(device_->bgscan_method_.empty());
 
   string method;
-  PropertyStoreInspector inspector(&device_->store());
-  EXPECT_TRUE(inspector.GetStringProperty(flimflam::kBgscanMethodProperty,
-                                          &method));
+  Error unused_error;
+  EXPECT_TRUE(device_->store().GetStringProperty(
+      flimflam::kBgscanMethodProperty, &method, &unused_error));
   EXPECT_EQ(WiFi::kDefaultBgscanMethod, method);
   EXPECT_EQ(wpa_supplicant::kNetworkBgscanMethodSimple, method);
 
@@ -169,14 +168,14 @@
           wpa_supplicant::kNetworkBgscanMethodLearn),
       &error));
   EXPECT_EQ(wpa_supplicant::kNetworkBgscanMethodLearn, device_->bgscan_method_);
-  EXPECT_TRUE(inspector.GetStringProperty(flimflam::kBgscanMethodProperty,
-                                          &method));
+  EXPECT_TRUE(device_->store().GetStringProperty(
+      flimflam::kBgscanMethodProperty, &method, &unused_error));
   EXPECT_EQ(wpa_supplicant::kNetworkBgscanMethodLearn, method);
 
   EXPECT_TRUE(DBusAdaptor::ClearProperty(
       device_->mutable_store(), flimflam::kBgscanMethodProperty, &error));
-  EXPECT_TRUE(inspector.GetStringProperty(flimflam::kBgscanMethodProperty,
-                                          &method));
+  EXPECT_TRUE(device_->store().GetStringProperty(
+      flimflam::kBgscanMethodProperty, &method, &unused_error));
   EXPECT_EQ(WiFi::kDefaultBgscanMethod, method);
   EXPECT_TRUE(device_->bgscan_method_.empty());
 }
