diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 21:41:20 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 21:41:20 +0000 |
commit | 7978ca630e74ce0ed6ec2562180230103d1b7ed0 (patch) | |
tree | 88c0da52d3f40000d034c37687df51328853dcf5 | |
parent | 011a3c21f0ea8e714aaf56ecf3feed7912e6649f (diff) | |
download | chromium_src-7978ca630e74ce0ed6ec2562180230103d1b7ed0.zip chromium_src-7978ca630e74ce0ed6ec2562180230103d1b7ed0.tar.gz chromium_src-7978ca630e74ce0ed6ec2562180230103d1b7ed0.tar.bz2 |
rAc i18n: implement storage interface for libaddressinput
BUG=325539
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/98623005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242803 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base.gyp | 1 | ||||
-rw-r--r-- | base/prefs/persistent_pref_store.h | 11 | ||||
-rw-r--r-- | base/prefs/value_map_pref_store.cc | 4 | ||||
-rw-r--r-- | base/prefs/value_map_pref_store.h | 16 | ||||
-rw-r--r-- | base/prefs/writeable_pref_store.h | 36 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/chrome_storage_impl.cc | 70 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/chrome_storage_impl.h | 58 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/chrome_storage_impl_unittest.cc | 34 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/cpp/libaddressinput.gyp | 1 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/cpp/test/fake_storage_test.cc | 53 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/cpp/test/storage_test_runner.cc | 86 | ||||
-rw-r--r-- | third_party/libaddressinput/chromium/cpp/test/storage_test_runner.h | 57 | ||||
-rw-r--r-- | third_party/libaddressinput/libaddressinput.gyp | 8 |
13 files changed, 367 insertions, 68 deletions
diff --git a/base/base.gyp b/base/base.gyp index bb1085d..52ea2e2 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -377,6 +377,7 @@ 'prefs/scoped_user_pref_update.h', 'prefs/value_map_pref_store.cc', 'prefs/value_map_pref_store.h', + 'prefs/writeable_pref_store.h', ], }, { diff --git a/base/prefs/persistent_pref_store.h b/base/prefs/persistent_pref_store.h index 811ebff..44f3442 100644 --- a/base/prefs/persistent_pref_store.h +++ b/base/prefs/persistent_pref_store.h @@ -8,12 +8,12 @@ #include <string> #include "base/prefs/base_prefs_export.h" -#include "base/prefs/pref_store.h" +#include "base/prefs/writeable_pref_store.h" // This interface is complementary to the PrefStore interface, declaring // additional functionality that adds support for setting values and persisting // the data to some backing store. -class BASE_PREFS_EXPORT PersistentPrefStore : public PrefStore { +class BASE_PREFS_EXPORT PersistentPrefStore : public WriteablePrefStore { public: // Unique integer code for each type of error so we can report them // distinctly in a histogram. @@ -50,19 +50,12 @@ class BASE_PREFS_EXPORT PersistentPrefStore : public PrefStore { // ReportValueChanged will trigger notifications even if nothing has changed. virtual void ReportValueChanged(const std::string& key) = 0; - // Sets a |value| for |key| in the store. Assumes ownership of |value|, which - // must be non-NULL. - virtual void SetValue(const std::string& key, base::Value* value) = 0; - // Same as SetValue, but doesn't generate notifications. This is used by // PrefService::GetMutableUserPref() in order to put empty entries // into the user pref store. Using SetValue is not an option since existing // tests rely on the number of notifications generated. virtual void SetValueSilently(const std::string& key, base::Value* value) = 0; - // Removes the value for |key|. - virtual void RemoveValue(const std::string& key) = 0; - // Whether the store is in a pseudo-read-only mode where changes are not // actually persisted to disk. This happens in some cases when there are // read errors during startup. diff --git a/base/prefs/value_map_pref_store.cc b/base/prefs/value_map_pref_store.cc index 750688c..0751469 100644 --- a/base/prefs/value_map_pref_store.cc +++ b/base/prefs/value_map_pref_store.cc @@ -28,8 +28,6 @@ bool ValueMapPrefStore::HasObservers() const { return observers_.might_have_observers(); } -ValueMapPrefStore::~ValueMapPrefStore() {} - void ValueMapPrefStore::SetValue(const std::string& key, base::Value* value) { if (prefs_.SetValue(key, value)) FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key)); @@ -40,6 +38,8 @@ void ValueMapPrefStore::RemoveValue(const std::string& key) { FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key)); } +ValueMapPrefStore::~ValueMapPrefStore() {} + void ValueMapPrefStore::NotifyInitializationCompleted() { FOR_EACH_OBSERVER(Observer, observers_, OnInitializationCompleted(true)); } diff --git a/base/prefs/value_map_pref_store.h b/base/prefs/value_map_pref_store.h index 21e4b88..29d0b382 100644 --- a/base/prefs/value_map_pref_store.h +++ b/base/prefs/value_map_pref_store.h @@ -11,12 +11,12 @@ #include "base/basictypes.h" #include "base/observer_list.h" #include "base/prefs/base_prefs_export.h" -#include "base/prefs/pref_store.h" #include "base/prefs/pref_value_map.h" +#include "base/prefs/writeable_pref_store.h" // A basic PrefStore implementation that uses a simple name-value map for // storing the preference values. -class BASE_PREFS_EXPORT ValueMapPrefStore : public PrefStore { +class BASE_PREFS_EXPORT ValueMapPrefStore : public WriteablePrefStore { public: ValueMapPrefStore(); @@ -27,17 +27,13 @@ class BASE_PREFS_EXPORT ValueMapPrefStore : public PrefStore { virtual void RemoveObserver(PrefStore::Observer* observer) OVERRIDE; virtual bool HasObservers() const OVERRIDE; + // WriteablePrefStore overrides: + virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; + virtual void RemoveValue(const std::string& key) OVERRIDE; + protected: virtual ~ValueMapPrefStore(); - // Store a |value| for |key| in the store. Also generates an notification if - // the value changed. Assumes ownership of |value|, which must be non-NULL. - void SetValue(const std::string& key, base::Value* value); - - // Remove the value for |key| from the store. Sends a notification if there - // was a value to be removed. - void RemoveValue(const std::string& key); - // Notify observers about the initialization completed event. void NotifyInitializationCompleted(); diff --git a/base/prefs/writeable_pref_store.h b/base/prefs/writeable_pref_store.h new file mode 100644 index 0000000..c24af95 --- /dev/null +++ b/base/prefs/writeable_pref_store.h @@ -0,0 +1,36 @@ +// Copyright 2014 The Chromium 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 BASE_PREFS_WRITEABLE_PREF_STORE_H_ +#define BASE_PREFS_WRITEABLE_PREF_STORE_H_ + +#include <string> + +#include "base/basictypes.h" +#include "base/prefs/pref_store.h" + +namespace base { +class Value; +} + +// A pref store that can be written to as well as read from. +class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore { + public: + WriteablePrefStore() {} + + // Sets a |value| for |key| in the store. Assumes ownership of |value|, which + // must be non-NULL. + virtual void SetValue(const std::string& key, base::Value* value) = 0; + + // Removes the value for |key|. + virtual void RemoveValue(const std::string& key) = 0; + + protected: + virtual ~WriteablePrefStore() {} + + private: + DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore); +}; + +#endif // BASE_PREFS_WRITEABLE_PREF_STORE_H_ diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl.cc b/third_party/libaddressinput/chromium/chrome_storage_impl.cc new file mode 100644 index 0000000..1c731a9 --- /dev/null +++ b/third_party/libaddressinput/chromium/chrome_storage_impl.cc @@ -0,0 +1,70 @@ +// Copyright 2014 The Chromium 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 "third_party/libaddressinput/chromium/chrome_storage_impl.h" + +#include "base/prefs/writeable_pref_store.h" +#include "base/values.h" + +ChromeStorageImpl::ChromeStorageImpl(WriteablePrefStore* store) + : backing_store_(store), + scoped_observer_(this) { + scoped_observer_.Add(backing_store_); +} + +ChromeStorageImpl::~ChromeStorageImpl() { + // TODO(estade): this shouldn't be necessary. + for (std::vector<Request*>::iterator iter = + outstanding_requests_.begin(); + iter != outstanding_requests_.end(); ++iter) { + (*(*iter)->callback)(false, (*iter)->key, std::string()); + } +} + +void ChromeStorageImpl::Put(const std::string& key, const std::string& data) { + backing_store_->SetValue(key, new base::StringValue(data)); +} + +void ChromeStorageImpl::Get( + const std::string& key, + scoped_ptr<Storage::Callback> data_ready) const { + // |Get()| should not be const, so this is just a thunk that fixes that. + const_cast<ChromeStorageImpl*>(this)->DoGet(key, data_ready.Pass()); +} + +void ChromeStorageImpl::OnPrefValueChanged(const std::string& key) {} + +void ChromeStorageImpl::OnInitializationCompleted(bool succeeded) { + for (std::vector<Request*>::iterator iter = + outstanding_requests_.begin(); + iter != outstanding_requests_.end(); ++iter) { + DoGet((*iter)->key, (*iter)->callback.Pass()); + } + + outstanding_requests_.clear(); +} + +void ChromeStorageImpl::DoGet( + const std::string& key, + scoped_ptr<Storage::Callback> data_ready) { + if (!backing_store_->IsInitializationComplete()) { + outstanding_requests_.push_back( + new Request(key, data_ready.Pass())); + return; + } + + const base::Value* value; + std::string result; + if (backing_store_->GetValue(key, &value) && + value->GetAsString(&result)) { + (*data_ready)(true, key, result); + } else { + (*data_ready)(false, key, std::string()); + } +} + +ChromeStorageImpl::Request::Request(const std::string& key, + scoped_ptr<Storage::Callback> callback) + : key(key), + callback(callback.Pass()) {} diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl.h b/third_party/libaddressinput/chromium/chrome_storage_impl.h new file mode 100644 index 0000000..11da948 --- /dev/null +++ b/third_party/libaddressinput/chromium/chrome_storage_impl.h @@ -0,0 +1,58 @@ +// Copyright 2014 The Chromium 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 THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ +#define THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ + +#include <list> +#include <string> + +#include "base/memory/scoped_vector.h" +#include "base/prefs/pref_store.h" +#include "base/scoped_observer.h" +#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/storage.h" +#include "third_party/libaddressinput/chromium/cpp/include/libaddressinput/util/scoped_ptr.h" + +class WriteablePrefStore; + +// An implementation of the Storage interface which passes through to an +// underlying WriteablePrefStore. +class ChromeStorageImpl : public i18n::addressinput::Storage, + public PrefStore::Observer { + public: + // |store| must outlive |this|. + explicit ChromeStorageImpl(WriteablePrefStore* store); + virtual ~ChromeStorageImpl(); + + // i18n::addressinput::Storage implementation. + virtual void Put(const std::string& key, const std::string& data) OVERRIDE; + virtual void Get(const std::string& key, scoped_ptr<Callback> data_ready) + const OVERRIDE; + + // PrefStore::Observer implementation. + virtual void OnPrefValueChanged(const std::string& key) OVERRIDE; + virtual void OnInitializationCompleted(bool succeeded) OVERRIDE; + + private: + struct Request { + Request(const std::string& key, scoped_ptr<Callback> callback); + + std::string key; + scoped_ptr<Callback> callback; + }; + + // Non-const version of Get(). + void DoGet(const std::string& key, scoped_ptr<Callback> data_ready); + + WriteablePrefStore* backing_store_; // weak + + // Get requests that haven't yet been serviced. + ScopedVector<Request> outstanding_requests_; + + ScopedObserver<PrefStore, ChromeStorageImpl> scoped_observer_; + + DISALLOW_COPY_AND_ASSIGN(ChromeStorageImpl); +}; + +#endif // THIRD_PARTY_LIBADDRESSINPUT_CHROMIUM_CHROME_STORAGE_IMPL_H_ diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl_unittest.cc b/third_party/libaddressinput/chromium/chrome_storage_impl_unittest.cc new file mode 100644 index 0000000..12ac2ef --- /dev/null +++ b/third_party/libaddressinput/chromium/chrome_storage_impl_unittest.cc @@ -0,0 +1,34 @@ +// Copyright 2014 The Chromium 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 "third_party/libaddressinput/chromium/chrome_storage_impl.h" + +#include <string> + +#include "base/prefs/value_map_pref_store.h" +#include "cpp/test/storage_test_runner.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { + +// Tests for ChromeStorageImpl object. +class ChromeStorageImplTest : public testing::Test { + protected: + ChromeStorageImplTest() + : store_(new ValueMapPrefStore()), + storage_(store_.get()), + runner_(&storage_) {} + + virtual ~ChromeStorageImplTest() {} + + scoped_refptr<ValueMapPrefStore> store_; + ChromeStorageImpl storage_; + i18n::addressinput::StorageTestRunner runner_; +}; + +TEST_F(ChromeStorageImplTest, StandardStorageTests) { + EXPECT_NO_FATAL_FAILURE(runner_.RunAllTests()); +} + +} // namespace diff --git a/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp b/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp index 4fd414b..c20637a 100644 --- a/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp +++ b/third_party/libaddressinput/chromium/cpp/libaddressinput.gyp @@ -71,6 +71,7 @@ 'test/region_data_constants_test.cc', 'test/retriever_test.cc', 'test/rule_test.cc', + 'test/storage_test_runner.cc', 'test/util/json_test.cc', 'test/util/md5_unittest.cc', 'test/util/scoped_ptr_unittest.cc', diff --git a/third_party/libaddressinput/chromium/cpp/test/fake_storage_test.cc b/third_party/libaddressinput/chromium/cpp/test/fake_storage_test.cc index 8abc3b9..ee4137e 100644 --- a/third_party/libaddressinput/chromium/cpp/test/fake_storage_test.cc +++ b/third_party/libaddressinput/chromium/cpp/test/fake_storage_test.cc @@ -14,14 +14,12 @@ #include "fake_storage.h" -#include <libaddressinput/callback.h> -#include <libaddressinput/storage.h> -#include <libaddressinput/util/scoped_ptr.h> - #include <string> #include <gtest/gtest.h> +#include "storage_test_runner.h" + namespace i18n { namespace addressinput { @@ -30,54 +28,15 @@ namespace { // Tests for FakeStorage object. class FakeStorageTest : public testing::Test { protected: - FakeStorageTest() : storage_(), success_(false), key_(), data_() {} + FakeStorageTest() : storage_(), runner_(&storage_) {} virtual ~FakeStorageTest() {} - scoped_ptr<Storage::Callback> BuildCallback() { - return ::i18n::addressinput::BuildCallback( - this, &FakeStorageTest::OnDataReady); - } - FakeStorage storage_; - bool success_; - std::string key_; - std::string data_; - - private: - void OnDataReady(bool success, - const std::string& key, - const std::string& data) { - success_ = success; - key_ = key; - data_ = data; - } + StorageTestRunner runner_; }; -TEST_F(FakeStorageTest, GetWithoutPutReturnsEmptyData) { - storage_.Get("key", BuildCallback()); - - EXPECT_FALSE(success_); - EXPECT_EQ("key", key_); - EXPECT_TRUE(data_.empty()); -} - -TEST_F(FakeStorageTest, GetReturnsWhatWasPut) { - storage_.Put("key", "value"); - storage_.Get("key", BuildCallback()); - - EXPECT_TRUE(success_); - EXPECT_EQ("key", key_); - EXPECT_EQ("value", data_); -} - -TEST_F(FakeStorageTest, SecondPutOverwritesData) { - storage_.Put("key", "bad-value"); - storage_.Put("key", "good-value"); - storage_.Get("key", BuildCallback()); - - EXPECT_TRUE(success_); - EXPECT_EQ("key", key_); - EXPECT_EQ("good-value", data_); +TEST_F(FakeStorageTest, StandardStorageTests) { + EXPECT_NO_FATAL_FAILURE(runner_.RunAllTests()); } } // namespace diff --git a/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.cc b/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.cc new file mode 100644 index 0000000..aac52e1 --- /dev/null +++ b/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.cc @@ -0,0 +1,86 @@ +// Copyright (C) 2013 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "storage_test_runner.h" + +#include <libaddressinput/callback.h> + +#include <gtest/gtest.h> + +namespace i18n { +namespace addressinput { + +StorageTestRunner::StorageTestRunner(Storage* storage) + : storage_(storage), + success_(false), + key_(), + data_() {} + +void StorageTestRunner::RunAllTests() { + EXPECT_NO_FATAL_FAILURE(GetWithoutPutReturnsEmptyData()); + EXPECT_NO_FATAL_FAILURE(GetReturnsWhatWasPut()); + EXPECT_NO_FATAL_FAILURE(SecondPutOverwritesData()); +} + +void StorageTestRunner::ClearValues() { + success_ = false; + key_.clear(); + data_.clear(); +} + +scoped_ptr<Storage::Callback> StorageTestRunner::BuildCallback() { + return ::i18n::addressinput::BuildCallback( + this, &StorageTestRunner::OnDataReady); +} + +void StorageTestRunner::OnDataReady(bool success, + const std::string& key, + const std::string& data) { + success_ = success; + key_ = key; + data_ = data; +} + +void StorageTestRunner::GetWithoutPutReturnsEmptyData() { + ClearValues(); + storage_->Get("key", BuildCallback()); + + EXPECT_FALSE(success_); + EXPECT_EQ("key", key_); + EXPECT_TRUE(data_.empty()); +} + +void StorageTestRunner::GetReturnsWhatWasPut() { + ClearValues(); + storage_->Put("key", "value"); + storage_->Get("key", BuildCallback()); + + EXPECT_TRUE(success_); + EXPECT_EQ("key", key_); + EXPECT_EQ("value", data_); +} + +void StorageTestRunner::SecondPutOverwritesData() { + ClearValues(); + storage_->Put("key", "bad-value"); + storage_->Put("key", "good-value"); + storage_->Get("key", BuildCallback()); + + EXPECT_TRUE(success_); + EXPECT_EQ("key", key_); + EXPECT_EQ("good-value", data_); +} + +} // addressinput +} // i18n diff --git a/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.h b/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.h new file mode 100644 index 0000000..7963dfb --- /dev/null +++ b/third_party/libaddressinput/chromium/cpp/test/storage_test_runner.h @@ -0,0 +1,57 @@ +// Copyright (C) 2013 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef I18N_ADDRESSINPUT_TEST_STORAGE_TEST_RUNNER_H_ +#define I18N_ADDRESSINPUT_TEST_STORAGE_TEST_RUNNER_H_ + +#include <libaddressinput/storage.h> +#include <libaddressinput/util/basictypes.h> +#include <libaddressinput/util/scoped_ptr.h> + +#include <string> + +namespace i18n { +namespace addressinput { + +class StorageTestRunner { + public: + explicit StorageTestRunner(Storage* storage); + + // Runs all the tests from the standard test suite. + void RunAllTests(); + + private: + void ClearValues(); + scoped_ptr<Storage::Callback> BuildCallback(); + void OnDataReady(bool success, + const std::string& key, + const std::string& data); + + // Test suite. + void GetWithoutPutReturnsEmptyData(); + void GetReturnsWhatWasPut(); + void SecondPutOverwritesData(); + + Storage* storage_; // weak + bool success_; + std::string key_; + std::string data_; + + DISALLOW_COPY_AND_ASSIGN(StorageTestRunner); +}; + +} // namespace addressinput +} // namespace i18n + +#endif // I18N_ADDRESSINPUT_TEST_STORAGE_TEST_RUNNER_H_ diff --git a/third_party/libaddressinput/libaddressinput.gyp b/third_party/libaddressinput/libaddressinput.gyp index e76285f..f19857b 100644 --- a/third_party/libaddressinput/libaddressinput.gyp +++ b/third_party/libaddressinput/libaddressinput.gyp @@ -49,6 +49,8 @@ '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', ], 'sources': [ + 'chromium/chrome_storage_impl.cc', + 'chromium/chrome_storage_impl.h', 'chromium/json.cc', '<(libaddressinput_dir)/cpp/include/libaddressinput/address_data.h', '<(libaddressinput_dir)/cpp/include/libaddressinput/address_field.h', @@ -115,6 +117,9 @@ '<(SHARED_INTERMEDIATE_DIR)/libaddressinput/', ], 'sources': [ + 'chromium/chrome_storage_impl.cc', + 'chromium/chrome_storage_impl.h', + 'chromium/chrome_storage_impl_unittest.cc', '<(libaddressinput_dir)/cpp/test/address_field_util_test.cc', '<(libaddressinput_dir)/cpp/test/address_ui_test.cc', '<(libaddressinput_dir)/cpp/test/fake_downloader.cc', @@ -128,6 +133,8 @@ '<(libaddressinput_dir)/cpp/test/region_data_constants_test.cc', '<(libaddressinput_dir)/cpp/test/retriever_test.cc', '<(libaddressinput_dir)/cpp/test/rule_test.cc', + '<(libaddressinput_dir)/cpp/test/storage_test_runner.cc', + '<(libaddressinput_dir)/cpp/test/storage_test_runner.h', '<(libaddressinput_dir)/cpp/test/util/json_test.cc', '<(libaddressinput_dir)/cpp/test/util/md5_unittest.cc', '<(libaddressinput_dir)/cpp/test/util/scoped_ptr_unittest.cc', @@ -141,6 +148,7 @@ ], 'dependencies': [ 'libaddressinput', + '<(DEPTH)/base/base.gyp:base_prefs', '<(DEPTH)/base/base.gyp:run_all_unittests', '<(DEPTH)/testing/gtest.gyp:gtest', ], |