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/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 explicit ExtensionTracker(Profile* profile); | 70 explicit ExtensionTracker(Profile* profile); |
71 virtual ~ExtensionTracker() {} | 71 virtual ~ExtensionTracker() {} |
72 | 72 |
73 private: | 73 private: |
74 // ExtensionRegistryObserver implementation. | 74 // ExtensionRegistryObserver implementation. |
75 virtual void OnExtensionWillBeInstalled( | 75 virtual void OnExtensionWillBeInstalled( |
76 content::BrowserContext* browser_context, | 76 content::BrowserContext* browser_context, |
77 const Extension* extension, | 77 const Extension* extension, |
78 bool is_update, | 78 bool is_update, |
79 bool from_ephemeral, | 79 bool from_ephemeral, |
80 const std::string& old_name) OVERRIDE; | 80 const std::string& old_name) override; |
81 virtual void OnExtensionUninstalled( | 81 virtual void OnExtensionUninstalled( |
82 content::BrowserContext* browser_context, | 82 content::BrowserContext* browser_context, |
83 const Extension* extension, | 83 const Extension* extension, |
84 extensions::UninstallReason reason) OVERRIDE; | 84 extensions::UninstallReason reason) override; |
85 | 85 |
86 // Handler for the signal from ExtensionSystem::ready(). | 86 // Handler for the signal from ExtensionSystem::ready(). |
87 void OnExtensionsReady(); | 87 void OnExtensionsReady(); |
88 | 88 |
89 // Starts a schema load for all extensions that use managed storage. | 89 // Starts a schema load for all extensions that use managed storage. |
90 void LoadSchemas(scoped_ptr<ExtensionSet> added); | 90 void LoadSchemas(scoped_ptr<ExtensionSet> added); |
91 | 91 |
92 bool UsesManagedStorage(const Extension* extension) const; | 92 bool UsesManagedStorage(const Extension* extension) const; |
93 | 93 |
94 // Loads the schemas of the |extensions| and passes a ComponentMap to | 94 // Loads the schemas of the |extensions| and passes a ComponentMap to |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 368 |
369 return store; | 369 return store; |
370 } | 370 } |
371 | 371 |
372 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const { | 372 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const { |
373 // TODO(joaodasilva): move this check to a ValueStore method. | 373 // TODO(joaodasilva): move this check to a ValueStore method. |
374 return base::DirectoryExists(base_path_.AppendASCII(extension_id)); | 374 return base::DirectoryExists(base_path_.AppendASCII(extension_id)); |
375 } | 375 } |
376 | 376 |
377 } // namespace extensions | 377 } // namespace extensions |
OLD | NEW |