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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 const char* ExtensionService::kInstallDirectoryName = "Extensions"; | 182 const char* ExtensionService::kInstallDirectoryName = "Extensions"; |
183 | 183 |
184 const char* ExtensionService::kLocalAppSettingsDirectoryName = | 184 const char* ExtensionService::kLocalAppSettingsDirectoryName = |
185 "Local App Settings"; | 185 "Local App Settings"; |
186 const char* ExtensionService::kLocalExtensionSettingsDirectoryName = | 186 const char* ExtensionService::kLocalExtensionSettingsDirectoryName = |
187 "Local Extension Settings"; | 187 "Local Extension Settings"; |
188 const char* ExtensionService::kSyncAppSettingsDirectoryName = | 188 const char* ExtensionService::kSyncAppSettingsDirectoryName = |
189 "Sync App Settings"; | 189 "Sync App Settings"; |
190 const char* ExtensionService::kSyncExtensionSettingsDirectoryName = | 190 const char* ExtensionService::kSyncExtensionSettingsDirectoryName = |
191 "Sync Extension Settings"; | 191 "Sync Extension Settings"; |
| 192 const char* ExtensionService::kStateStoreName = "Extension State"; |
192 | 193 |
193 void ExtensionService::CheckExternalUninstall(const std::string& id) { | 194 void ExtensionService::CheckExternalUninstall(const std::string& id) { |
194 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 195 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
195 | 196 |
196 // Check if the providers know about this extension. | 197 // Check if the providers know about this extension. |
197 ProviderCollection::const_iterator i; | 198 ProviderCollection::const_iterator i; |
198 for (i = external_extension_providers_.begin(); | 199 for (i = external_extension_providers_.begin(); |
199 i != external_extension_providers_.end(); ++i) { | 200 i != external_extension_providers_.end(); ++i) { |
200 DCHECK(i->get()->IsReady()); | 201 DCHECK(i->get()->IsReady()); |
201 if (i->get()->HasExtension(id)) | 202 if (i->get()->HasExtension(id)) |
(...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2549 | 2550 |
2550 // To coexist with certain unit tests that don't have a work-thread message | 2551 // To coexist with certain unit tests that don't have a work-thread message |
2551 // loop available at ExtensionService shutdown, we lazy-initialize this | 2552 // loop available at ExtensionService shutdown, we lazy-initialize this |
2552 // object so that those cases neither create nor destroy an | 2553 // object so that those cases neither create nor destroy an |
2553 // APIResourceController. | 2554 // APIResourceController. |
2554 if (!api_resource_controller_.get()) { | 2555 if (!api_resource_controller_.get()) { |
2555 api_resource_controller_.reset(new extensions::APIResourceController()); | 2556 api_resource_controller_.reset(new extensions::APIResourceController()); |
2556 } | 2557 } |
2557 return api_resource_controller_.get(); | 2558 return api_resource_controller_.get(); |
2558 } | 2559 } |
OLD | NEW |