| OLD | NEW |
| 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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" | 8 #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" |
| 9 #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules
_registry.h" | 9 #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules
_registry.h" |
| 10 #include "chrome/browser/extensions/api/management/chrome_management_api_delegat
e.h" | 10 #include "chrome/browser/extensions/api/management/chrome_management_api_delegat
e.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 namespace extensions { | 33 namespace extensions { |
| 34 | 34 |
| 35 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {} | 35 ChromeExtensionsAPIClient::ChromeExtensionsAPIClient() {} |
| 36 | 36 |
| 37 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {} | 37 ChromeExtensionsAPIClient::~ChromeExtensionsAPIClient() {} |
| 38 | 38 |
| 39 void ChromeExtensionsAPIClient::AddAdditionalValueStoreCaches( | 39 void ChromeExtensionsAPIClient::AddAdditionalValueStoreCaches( |
| 40 content::BrowserContext* context, | 40 content::BrowserContext* context, |
| 41 const scoped_refptr<SettingsStorageFactory>& factory, | 41 const scoped_refptr<SettingsStorageFactory>& factory, |
| 42 const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, | 42 const scoped_refptr<base::ObserverListThreadSafe<SettingsObserver>>& |
| 43 observers, |
| 43 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) { | 44 std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) { |
| 44 // Add support for chrome.storage.sync. | 45 // Add support for chrome.storage.sync. |
| 45 (*caches)[settings_namespace::SYNC] = | 46 (*caches)[settings_namespace::SYNC] = |
| 46 new SyncValueStoreCache(factory, observers, context->GetPath()); | 47 new SyncValueStoreCache(factory, observers, context->GetPath()); |
| 47 | 48 |
| 48 #if defined(ENABLE_CONFIGURATION_POLICY) | 49 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 49 // Add support for chrome.storage.managed. | 50 // Add support for chrome.storage.managed. |
| 50 (*caches)[settings_namespace::MANAGED] = | 51 (*caches)[settings_namespace::MANAGED] = |
| 51 new ManagedValueStoreCache(context, factory, observers); | 52 new ManagedValueStoreCache(context, factory, observers); |
| 52 #endif | 53 #endif |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return nullptr; | 114 return nullptr; |
| 114 #endif | 115 #endif |
| 115 } | 116 } |
| 116 | 117 |
| 117 ManagementAPIDelegate* ChromeExtensionsAPIClient::CreateManagementAPIDelegate() | 118 ManagementAPIDelegate* ChromeExtensionsAPIClient::CreateManagementAPIDelegate() |
| 118 const { | 119 const { |
| 119 return new ChromeManagementAPIDelegate; | 120 return new ChromeManagementAPIDelegate; |
| 120 } | 121 } |
| 121 | 122 |
| 122 } // namespace extensions | 123 } // namespace extensions |
| OLD | NEW |