| 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_system.h" | 5 #include "chrome/browser/extensions/extension_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/string_tokenizer.h" | 10 #include "base/string_tokenizer.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ExtensionEventRouter* ExtensionSystemImpl::event_router() { | 295 ExtensionEventRouter* ExtensionSystemImpl::event_router() { |
| 296 return shared_->event_router(); | 296 return shared_->event_router(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 extensions::RulesRegistryService* | 299 extensions::RulesRegistryService* |
| 300 ExtensionSystemImpl::rules_registry_service() { | 300 ExtensionSystemImpl::rules_registry_service() { |
| 301 return shared_->rules_registry_service(); | 301 return shared_->rules_registry_service(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void ExtensionSystemImpl::RegisterExtensionWithRequestContexts( | 304 void ExtensionSystemImpl::RegisterExtensionWithRequestContexts( |
| 305 const Extension* extension) { | 305 const extensions::Extension* extension) { |
| 306 base::Time install_time; | 306 base::Time install_time; |
| 307 if (extension->location() != Extension::COMPONENT) { | 307 if (extension->location() != extensions::Extension::COMPONENT) { |
| 308 install_time = extension_service()->extension_prefs()-> | 308 install_time = extension_service()->extension_prefs()-> |
| 309 GetInstallTime(extension->id()); | 309 GetInstallTime(extension->id()); |
| 310 } | 310 } |
| 311 bool incognito_enabled = | 311 bool incognito_enabled = |
| 312 extension_service()->IsIncognitoEnabled(extension->id()); | 312 extension_service()->IsIncognitoEnabled(extension->id()); |
| 313 BrowserThread::PostTask( | 313 BrowserThread::PostTask( |
| 314 BrowserThread::IO, FROM_HERE, | 314 BrowserThread::IO, FROM_HERE, |
| 315 base::Bind(&ExtensionInfoMap::AddExtension, info_map(), | 315 base::Bind(&ExtensionInfoMap::AddExtension, info_map(), |
| 316 make_scoped_refptr(extension), install_time, | 316 make_scoped_refptr(extension), install_time, |
| 317 incognito_enabled)); | 317 incognito_enabled)); |
| 318 } | 318 } |
| 319 | 319 |
| 320 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 320 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
| 321 const std::string& extension_id, | 321 const std::string& extension_id, |
| 322 const extension_misc::UnloadedExtensionReason reason) { | 322 const extension_misc::UnloadedExtensionReason reason) { |
| 323 BrowserThread::PostTask( | 323 BrowserThread::PostTask( |
| 324 BrowserThread::IO, FROM_HERE, | 324 BrowserThread::IO, FROM_HERE, |
| 325 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), | 325 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), |
| 326 extension_id, reason)); | 326 extension_id, reason)); |
| 327 } | 327 } |
| OLD | NEW |