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

Side by Side Diff: chrome/browser/extensions/api/storage/settings_sync_util.h

Issue 2799653006: Revert of [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_API_STORAGE_SETTINGS_SYNC_UTIL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_SYNC_UTIL_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_SYNC_UTIL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_SYNC_UTIL_H_
7 7
8 #include <string>
9
10 #include "components/sync/driver/sync_client.h"
11 #include "components/sync/model/sync_change.h" 8 #include "components/sync/model/sync_change.h"
12 #include "components/sync/model/sync_data.h" 9 #include "components/sync/model/sync_data.h"
13 10
14 namespace base { 11 namespace base {
15 class Value; 12 class Value;
16 } 13 }
17 14
18 namespace content { 15 namespace content {
19 class BrowserContext; 16 class BrowserContext;
20 } 17 }
21 18
19 namespace syncer {
20 class SyncableService;
21 }
22
22 namespace extensions { 23 namespace extensions {
23 24
24 namespace settings_sync_util { 25 namespace settings_sync_util {
25 26
26 // Creates a syncer::SyncData object for an extension or app setting. 27 // Creates a syncer::SyncData object for an extension or app setting.
27 syncer::SyncData CreateData( 28 syncer::SyncData CreateData(
28 const std::string& extension_id, 29 const std::string& extension_id,
29 const std::string& key, 30 const std::string& key,
30 const base::Value& value, 31 const base::Value& value,
31 syncer::ModelType type); 32 syncer::ModelType type);
(...skipping 13 matching lines...) Expand all
45 syncer::ModelType type); 46 syncer::ModelType type);
46 47
47 // Creates a "delete" sync change for an extension or app setting. 48 // Creates a "delete" sync change for an extension or app setting.
48 syncer::SyncChange CreateDelete( 49 syncer::SyncChange CreateDelete(
49 const std::string& extension_id, 50 const std::string& extension_id,
50 const std::string& key, 51 const std::string& key,
51 syncer::ModelType type); 52 syncer::ModelType type);
52 53
53 // Returns the sync service for settings. Must be called on the FILE thread. 54 // Returns the sync service for settings. Must be called on the FILE thread.
54 // |type| must be either APP_SETTINGS or EXTENSION_SETTINGS. 55 // |type| must be either APP_SETTINGS or EXTENSION_SETTINGS.
55 syncer::SyncClient::ServiceProvider GetSyncableServiceProvider( 56 syncer::SyncableService* GetSyncableService(content::BrowserContext* context,
56 content::BrowserContext* context, 57 syncer::ModelType type);
57 syncer::ModelType type);
58 58
59 } // namespace settings_sync_util 59 } // namespace settings_sync_util
60 60
61 } // namespace extensions 61 } // namespace extensions
62 62
63 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_SYNC_UTIL_H_ 63 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_SYNC_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/storage/settings_apitest.cc ('k') | chrome/browser/extensions/api/storage/settings_sync_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698