Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: components/prefs/writeable_pref_store.h

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PREFS_WRITEABLE_PREF_STORE_H_ 5 #ifndef BASE_PREFS_WRITEABLE_PREF_STORE_H_
6 #define COMPONENTS_PREFS_WRITEABLE_PREF_STORE_H_ 6 #define BASE_PREFS_WRITEABLE_PREF_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "components/prefs/pref_store.h" 14 #include "components/prefs/pref_store.h"
15 15
16 namespace base { 16 namespace base {
17 class Value; 17 class Value;
18 } 18 }
19 19
20 // A pref store that can be written to as well as read from. 20 // A pref store that can be written to as well as read from.
21 class COMPONENTS_PREFS_EXPORT WriteablePrefStore : public PrefStore { 21 class BASE_PREFS_EXPORT WriteablePrefStore : public PrefStore {
22 public: 22 public:
23 // PrefWriteFlags can be used to change the way a pref will be written to 23 // PrefWriteFlags can be used to change the way a pref will be written to
24 // storage. 24 // storage.
25 enum PrefWriteFlags : uint32_t { 25 enum PrefWriteFlags : uint32_t {
26 // No flags are specified. 26 // No flags are specified.
27 DEFAULT_PREF_WRITE_FLAGS = 0, 27 DEFAULT_PREF_WRITE_FLAGS = 0,
28 28
29 // This marks the pref as "lossy". There is no strict time guarantee on when 29 // This marks the pref as "lossy". There is no strict time guarantee on when
30 // a lossy pref will be persisted to permanent storage when it is modified. 30 // a lossy pref will be persisted to permanent storage when it is modified.
31 LOSSY_PREF_WRITE_FLAG = 1 << 1 31 LOSSY_PREF_WRITE_FLAG = 1 << 1
(...skipping 30 matching lines...) Expand all
62 scoped_ptr<base::Value> value, 62 scoped_ptr<base::Value> value,
63 uint32_t flags) = 0; 63 uint32_t flags) = 0;
64 64
65 protected: 65 protected:
66 ~WriteablePrefStore() override {} 66 ~WriteablePrefStore() override {}
67 67
68 private: 68 private:
69 DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore); 69 DISALLOW_COPY_AND_ASSIGN(WriteablePrefStore);
70 }; 70 };
71 71
72 #endif // COMPONENTS_PREFS_WRITEABLE_PREF_STORE_H_ 72 #endif // BASE_PREFS_WRITEABLE_PREF_STORE_H_
OLDNEW
« no previous file with comments | « components/prefs/value_map_pref_store.h ('k') | components/syncable_prefs/pref_service_syncable_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698