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/api/storage/managed_value_store_cache.h" | 5 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/extensions/api/storage/policy_value_store.h" | 14 #include "chrome/browser/extensions/api/storage/policy_value_store.h" |
15 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h" | 15 #include "chrome/browser/extensions/api/storage/settings_storage_factory.h" |
16 #include "chrome/browser/extensions/extension_prefs.h" | 16 #include "chrome/browser/extensions/extension_prefs.h" |
17 #include "chrome/browser/extensions/extension_service.h" | 17 #include "chrome/browser/extensions/extension_service.h" |
18 #include "chrome/browser/extensions/extension_system.h" | 18 #include "chrome/browser/extensions/extension_system.h" |
19 #include "chrome/browser/policy/profile_policy_connector.h" | 19 #include "chrome/browser/policy/profile_policy_connector.h" |
20 #include "chrome/browser/policy/profile_policy_connector_factory.h" | 20 #include "chrome/browser/policy/profile_policy_connector_factory.h" |
21 #include "chrome/browser/policy/schema_registry_service.h" | 21 #include "chrome/browser/policy/schema_registry_service.h" |
22 #include "chrome/browser/policy/schema_registry_service_factory.h" | 22 #include "chrome/browser/policy/schema_registry_service_factory.h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/value_store/value_store_change.h" | 24 #include "chrome/browser/value_store/value_store_change.h" |
25 #include "chrome/common/extensions/api/storage.h" | 25 #include "chrome/common/extensions/api/storage.h" |
26 #include "chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
" | 26 #include "chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
" |
27 #include "chrome/common/extensions/extension_set.h" | |
28 #include "components/policy/core/common/policy_namespace.h" | 27 #include "components/policy/core/common/policy_namespace.h" |
29 #include "components/policy/core/common/schema.h" | 28 #include "components/policy/core/common/schema.h" |
30 #include "components/policy/core/common/schema_map.h" | 29 #include "components/policy/core/common/schema_map.h" |
31 #include "components/policy/core/common/schema_registry.h" | 30 #include "components/policy/core/common/schema_registry.h" |
32 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/notification_details.h" | 32 #include "content/public/browser/notification_details.h" |
34 #include "content/public/browser/notification_observer.h" | 33 #include "content/public/browser/notification_observer.h" |
35 #include "content/public/browser/notification_registrar.h" | 34 #include "content/public/browser/notification_registrar.h" |
36 #include "content/public/browser/notification_source.h" | 35 #include "content/public/browser/notification_source.h" |
37 #include "extensions/common/constants.h" | 36 #include "extensions/common/constants.h" |
38 #include "extensions/common/extension.h" | 37 #include "extensions/common/extension.h" |
| 38 #include "extensions/common/extension_set.h" |
39 #include "extensions/common/manifest.h" | 39 #include "extensions/common/manifest.h" |
40 #include "extensions/common/manifest_constants.h" | 40 #include "extensions/common/manifest_constants.h" |
41 #include "extensions/common/one_shot_event.h" | 41 #include "extensions/common/one_shot_event.h" |
42 | 42 |
43 using content::BrowserThread; | 43 using content::BrowserThread; |
44 | 44 |
45 namespace extensions { | 45 namespace extensions { |
46 | 46 |
47 namespace storage = api::storage; | 47 namespace storage = api::storage; |
48 | 48 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 return store; | 362 return store; |
363 } | 363 } |
364 | 364 |
365 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const { | 365 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const { |
366 // TODO(joaodasilva): move this check to a ValueStore method. | 366 // TODO(joaodasilva): move this check to a ValueStore method. |
367 return base::DirectoryExists(base_path_.AppendASCII(extension_id)); | 367 return base::DirectoryExists(base_path_.AppendASCII(extension_id)); |
368 } | 368 } |
369 | 369 |
370 } // namespace extensions | 370 } // namespace extensions |
OLD | NEW |