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

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

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Reordering 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_SYNC_HELPER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_SYNC_HELPER_H_
7 #pragma once
8
9 #include "base/values.h"
10 #include "chrome/browser/sync/api/sync_data.h"
11 #include "chrome/browser/sync/api/sync_change.h"
12
13 // Helper for creating SyncData and SyncChanges for extension setting objects.
14 class ExtensionSettingsSyncHelper {
Ben Olmstead 2011/08/31 17:36:43 We usually just use a namespace for a collection o
not at google - send to devlin 2011/09/02 05:00:40 Done. Also renamed helper -> util since that seem
15 public:
16 // Creates a SyncData object for an extension setting.
17 static SyncData CreateData(
18 const std::string& extension_id,
19 const std::string& key,
20 const Value& value);
21
22 // Creates an "add" sync change for an extension setting.
23 static SyncChange CreateAdd(
24 const std::string& extension_id,
25 const std::string& key,
26 const Value& value);
27
28 // Creates an "update" sync change for an extension setting.
29 static SyncChange CreateUpdate(
30 const std::string& extension_id,
31 const std::string& key,
32 const Value& value);
33
34 // Creates a "delete" sync change for an extension setting.
35 static SyncChange CreateDelete(
36 const std::string& extension_id, const std::string& key);
37
38 private:
39 ExtensionSettingsSyncHelper();
40 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsSyncHelper);
41 };
42
43 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SETTINGS_SYNC_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698