OLD | NEW |
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 #include "chrome/browser/extensions/settings/settings_frontend.h" | 5 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/json/json_reader.h" | 12 #include "base/json/json_reader.h" |
| 13 #include "chrome/browser/extensions/api/storage/leveldb_settings_storage_factory
.h" |
| 14 #include "chrome/browser/extensions/api/storage/settings_backend.h" |
| 15 #include "chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.
h" |
13 #include "chrome/browser/extensions/event_names.h" | 16 #include "chrome/browser/extensions/event_names.h" |
14 #include "chrome/browser/extensions/event_router.h" | 17 #include "chrome/browser/extensions/event_router.h" |
15 #include "chrome/browser/extensions/extension_service.h" | 18 #include "chrome/browser/extensions/extension_service.h" |
16 #include "chrome/browser/extensions/extension_system.h" | 19 #include "chrome/browser/extensions/extension_system.h" |
17 #include "chrome/browser/extensions/settings/leveldb_settings_storage_factory.h" | |
18 #include "chrome/browser/extensions/settings/settings_backend.h" | |
19 #include "chrome/browser/extensions/settings/sync_or_local_value_store_cache.h" | |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/common/extensions/api/storage.h" | 21 #include "chrome/common/extensions/api/storage.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 | 23 |
24 #if defined(ENABLE_CONFIGURATION_POLICY) | 24 #if defined(ENABLE_CONFIGURATION_POLICY) |
25 #include "chrome/browser/extensions/settings/managed_value_store_cache.h" | 25 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" |
26 #endif | 26 #endif |
27 | 27 |
28 using content::BrowserThread; | 28 using content::BrowserThread; |
29 | 29 |
30 namespace extensions { | 30 namespace extensions { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Settings change Observer which forwards changes on to the extension | 34 // Settings change Observer which forwards changes on to the extension |
35 // processes for |profile| and its incognito partner if it exists. | 35 // processes for |profile| and its incognito partner if it exists. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 CacheMap::iterator it = caches_.find(settings_namespace); | 209 CacheMap::iterator it = caches_.find(settings_namespace); |
210 if (it != caches_.end()) { | 210 if (it != caches_.end()) { |
211 ValueStoreCache* cache = it->second; | 211 ValueStoreCache* cache = it->second; |
212 cache->ShutdownOnUI(); | 212 cache->ShutdownOnUI(); |
213 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, cache); | 213 BrowserThread::DeleteSoon(BrowserThread::FILE, FROM_HERE, cache); |
214 caches_.erase(it); | 214 caches_.erase(it); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 } // namespace extensions | 218 } // namespace extensions |
OLD | NEW |