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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 ExtensionSystemImpl::Shared::~Shared() { | 73 ExtensionSystemImpl::Shared::~Shared() { |
74 if (rules_registry_service_.get()) | 74 if (rules_registry_service_.get()) |
75 rules_registry_service_->Shutdown(); | 75 rules_registry_service_->Shutdown(); |
76 } | 76 } |
77 | 77 |
78 void ExtensionSystemImpl::Shared::InitPrefs() { | 78 void ExtensionSystemImpl::Shared::InitPrefs() { |
79 bool extensions_disabled = | 79 bool extensions_disabled = |
80 profile_->GetPrefs()->GetBoolean(prefs::kDisableExtensions) || | 80 profile_->GetPrefs()->GetBoolean(prefs::kDisableExtensions) || |
81 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); | 81 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); |
82 extension_prefs_.reset(new ExtensionPrefs( | 82 extension_prefs_.reset(new extensions::ExtensionPrefs( |
83 profile_->GetPrefs(), | 83 profile_->GetPrefs(), |
84 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), | 84 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), |
85 ExtensionPrefValueMapFactory::GetForProfile(profile_))); | 85 ExtensionPrefValueMapFactory::GetForProfile(profile_))); |
86 extension_prefs_->Init(extensions_disabled); | 86 extension_prefs_->Init(extensions_disabled); |
87 | 87 |
88 state_store_.reset(new extensions::StateStore( | 88 state_store_.reset(new extensions::StateStore( |
89 profile_, | 89 profile_, |
90 profile_->GetPath().AppendASCII(ExtensionService::kStateStoreName))); | 90 profile_->GetPath().AppendASCII(ExtensionService::kStateStoreName))); |
91 } | 91 } |
92 | 92 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 354 } |
355 | 355 |
356 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 356 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
357 const std::string& extension_id, | 357 const std::string& extension_id, |
358 const extension_misc::UnloadedExtensionReason reason) { | 358 const extension_misc::UnloadedExtensionReason reason) { |
359 BrowserThread::PostTask( | 359 BrowserThread::PostTask( |
360 BrowserThread::IO, FROM_HERE, | 360 BrowserThread::IO, FROM_HERE, |
361 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), | 361 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), |
362 extension_id, reason)); | 362 extension_id, reason)); |
363 } | 363 } |
OLD | NEW |