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

Side by Side Diff: chrome/browser/extensions/api/chrome_extensions_api_client.cc

Issue 184043031: Split up extensions storage API implementations for sync and local storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (split_sync) Created 6 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/storage/local_value_store_cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h" 5 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h"
6 6
7 #include "chrome/browser/extensions/api/storage/sync_value_store_cache.h"
8 #include "content/public/browser/browser_context.h"
9
7 #if defined(ENABLE_CONFIGURATION_POLICY) 10 #if defined(ENABLE_CONFIGURATION_POLICY)
8 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" 11 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h"
9 #endif 12 #endif
10 13
11 namespace extensions { 14 namespace extensions {
12 15
13 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {} 16 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {}
14 17
15 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {} 18 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {}
16 19
17 void ChromeExtensionsAPIClient::AddAdditionalValueStoreCaches( 20 void ChromeExtensionsAPIClient::AddAdditionalValueStoreCaches(
18 content::BrowserContext* context, 21 content::BrowserContext* context,
19 const scoped_refptr<SettingsStorageFactory>& factory, 22 const scoped_refptr<SettingsStorageFactory>& factory,
20 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, 23 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers,
21 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) { 24 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {
25 // Add support for chrome.storage.sync.
26 (*caches)[settings_namespace::SYNC] =
27 new SyncValueStoreCache(factory, observers, context->GetPath());
28
22 #if defined(ENABLE_CONFIGURATION_POLICY) 29 #if defined(ENABLE_CONFIGURATION_POLICY)
23 // Add support for chrome.storage.managed. 30 // Add support for chrome.storage.managed.
24 (*caches)[settings_namespace::MANAGED] = 31 (*caches)[settings_namespace::MANAGED] =
25 new ManagedValueStoreCache(context, factory, observers); 32 new ManagedValueStoreCache(context, factory, observers);
26 #endif 33 #endif
27 } 34 }
28 35
29 } // namespace extensions 36 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/storage/local_value_store_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698