Index: components/cronet/android/cronet_in_memory_pref_store.h |
diff --git a/android_webview/browser/aw_pref_store.h b/components/cronet/android/cronet_in_memory_pref_store.h |
similarity index 71% |
copy from android_webview/browser/aw_pref_store.h |
copy to components/cronet/android/cronet_in_memory_pref_store.h |
index aa062d120e0181e51f8b23a5466e78abe77e1ffb..c276ff87c5b6a3b6634707dd3bc182bcd8bbc8fe 100644 |
--- a/android_webview/browser/aw_pref_store.h |
+++ b/components/cronet/android/cronet_in_memory_pref_store.h |
@@ -1,9 +1,9 @@ |
-// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Copyright 2015 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 ANDROID_WEBVIEW_BROWSER_AW_PREF_STORE_H_ |
-#define ANDROID_WEBVIEW_BROWSER_AW_PREF_STORE_H_ |
+#ifndef COMPONENTS_CRONET_ANDROID_CRONET_IN_MEMORY_PREF_STORE_H_ |
+#define COMPONENTS_CRONET_ANDROID_CRONET_IN_MEMORY_PREF_STORE_H_ |
#include <string> |
@@ -13,15 +13,18 @@ |
#include "base/prefs/persistent_pref_store.h" |
#include "base/prefs/pref_value_map.h" |
+namespace base { |
+class Value; |
+} |
+ |
// A light-weight prefstore implementation that keeps preferences |
-// in a memory backed store. This is not a persistent prefstore -- we |
-// subclass the PersistentPrefStore here since it is needed by the |
-// PrefService, which in turn is needed by the Autofill component. |
-class AwPrefStore : public PersistentPrefStore { |
+// in a memory backed store. This is not a persistent prefstore. |
+// TODO(bengr): Move to base/prefs or some other shared location. |
+class CronetInMemoryPrefStore : public PersistentPrefStore { |
public: |
- AwPrefStore(); |
+ CronetInMemoryPrefStore(); |
- // Overriden from PrefStore. |
+ // PrefStore overrides: |
bool GetValue(const std::string& key, |
const base::Value** result) const override; |
void AddObserver(PrefStore::Observer* observer) override; |
@@ -45,16 +48,15 @@ class AwPrefStore : public PersistentPrefStore { |
void ReadPrefsAsync(ReadErrorDelegate* error_delegate) override; |
void CommitPendingWrite() override {} |
- protected: |
- ~AwPrefStore() override; |
- |
private: |
+ ~CronetInMemoryPrefStore() override; |
+ |
// Stores the preference values. |
PrefValueMap prefs_; |
ObserverList<PrefStore::Observer, true> observers_; |
- DISALLOW_COPY_AND_ASSIGN(AwPrefStore); |
+ DISALLOW_COPY_AND_ASSIGN(CronetInMemoryPrefStore); |
}; |
-#endif // ANDROID_WEBVIEW_BROWSER_AW_PREF_STORE_H_ |
+#endif // COMPONENTS_CRONET_ANDROID_CRONET_IN_MEMORY_PREF_STORE_H_ |