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

Side by Side Diff: chrome/browser/extensions/extension_settings_storage.h

Issue 7977018: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix race condition in ExtensionSettingsUIWrapper::Core Created 9 years, 3 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_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 17 matching lines...) Expand all
28 // Supports lightweight copying. 28 // Supports lightweight copying.
29 class Result { 29 class Result {
30 public: 30 public:
31 // Ownership of settings taken. 31 // Ownership of settings taken.
32 explicit Result(DictionaryValue* settings); 32 explicit Result(DictionaryValue* settings);
33 explicit Result(const std::string& error); 33 explicit Result(const std::string& error);
34 ~Result(); 34 ~Result();
35 35
36 // The dictionary result of the computation. NULL does not imply invalid; 36 // The dictionary result of the computation. NULL does not imply invalid;
37 // HasError() should be used to test this. 37 // HasError() should be used to test this.
38 // Wwnership remains with with the Result. 38 // Ownership remains with with the Result.
39 DictionaryValue* GetSettings() const; 39 DictionaryValue* GetSettings() const;
40 40
41 // Whether there was an error in the computation. If so, the results of 41 // Whether there was an error in the computation. If so, the results of
42 // GetSettings and ReleaseSettings are not valid. 42 // GetSettings and ReleaseSettings are not valid.
43 bool HasError() const; 43 bool HasError() const;
44 44
45 // Gets the error message, if any. 45 // Gets the error message, if any.
46 const std::string& GetError() const; 46 const std::string& GetError() const;
47 47
48 private: 48 private:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Removes multiple keys from the storage. 87 // Removes multiple keys from the storage.
88 // If successful, result value is NULL. 88 // If successful, result value is NULL.
89 virtual Result Remove(const std::vector<std::string>& keys) = 0; 89 virtual Result Remove(const std::vector<std::string>& keys) = 0;
90 90
91 // Clears the storage. 91 // Clears the storage.
92 // If successful, result value is NULL. 92 // If successful, result value is NULL.
93 virtual Result Clear() = 0; 93 virtual Result Clear() = 0;
94 }; 94 };
95 95
96 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_ 96 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698