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

Side by Side Diff: chrome/common/json_pref_store.h

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_JSON_PREF_STORE_H_ 5 #ifndef CHROME_COMMON_JSON_PREF_STORE_H_
6 #define CHROME_COMMON_JSON_PREF_STORE_H_ 6 #define CHROME_COMMON_JSON_PREF_STORE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
12 #include "base/file_path.h" 13 #include "base/file_path.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 15 #include "base/observer_list.h"
15 #include "chrome/common/important_file_writer.h" 16 #include "chrome/common/important_file_writer.h"
16 #include "chrome/common/persistent_pref_store.h" 17 #include "chrome/common/persistent_pref_store.h"
17 18
18 namespace base { 19 namespace base {
19 class DictionaryValue; 20 class DictionaryValue;
20 class MessageLoopProxy; 21 class MessageLoopProxy;
21 class Value; 22 class Value;
(...skipping 21 matching lines...) Expand all
43 // PersistentPrefStore overrides: 44 // PersistentPrefStore overrides:
44 virtual ReadResult GetMutableValue(const std::string& key, 45 virtual ReadResult GetMutableValue(const std::string& key,
45 base::Value** result) OVERRIDE; 46 base::Value** result) OVERRIDE;
46 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE; 47 virtual void SetValue(const std::string& key, base::Value* value) OVERRIDE;
47 virtual void SetValueSilently(const std::string& key, 48 virtual void SetValueSilently(const std::string& key,
48 base::Value* value) OVERRIDE; 49 base::Value* value) OVERRIDE;
49 virtual void RemoveValue(const std::string& key) OVERRIDE; 50 virtual void RemoveValue(const std::string& key) OVERRIDE;
50 virtual bool ReadOnly() const OVERRIDE; 51 virtual bool ReadOnly() const OVERRIDE;
51 virtual PrefReadError ReadPrefs() OVERRIDE; 52 virtual PrefReadError ReadPrefs() OVERRIDE;
52 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) OVERRIDE; 53 virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) OVERRIDE;
53 virtual bool WritePrefs() OVERRIDE;
54 virtual void ScheduleWritePrefs() OVERRIDE;
55 virtual void CommitPendingWrite() OVERRIDE; 54 virtual void CommitPendingWrite() OVERRIDE;
56 virtual void ReportValueChanged(const std::string& key) OVERRIDE; 55 virtual void ReportValueChanged(const std::string& key) OVERRIDE;
57 56
58 // This method is called after JSON file has been read. Method takes 57 // This method is called after JSON file has been read. Method takes
59 // ownership of the |value| pointer. Note, this method is used with 58 // ownership of the |value| pointer. Note, this method is used with
60 // asynchronous file reading, so class exposes it only for the internal needs. 59 // asynchronous file reading, so class exposes it only for the internal needs.
61 // (read: do not call it manually). 60 // (read: do not call it manually).
62 void OnFileRead(base::Value* value_owned, PrefReadError error, bool no_dir); 61 void OnFileRead(base::Value* value_owned, PrefReadError error, bool no_dir);
63 62
64 private: 63 private:
(...skipping 13 matching lines...) Expand all
78 ObserverList<PrefStore::Observer, true> observers_; 77 ObserverList<PrefStore::Observer, true> observers_;
79 78
80 scoped_ptr<ReadErrorDelegate> error_delegate_; 79 scoped_ptr<ReadErrorDelegate> error_delegate_;
81 80
82 bool initialized_; 81 bool initialized_;
83 82
84 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore); 83 DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
85 }; 84 };
86 85
87 #endif // CHROME_COMMON_JSON_PREF_STORE_H_ 86 #endif // CHROME_COMMON_JSON_PREF_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options2/core_options_handler2.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698