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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 | 56 |
57 // | 57 // |
58 // ExtensionSystemImpl::Shared | 58 // ExtensionSystemImpl::Shared |
59 // | 59 // |
60 | 60 |
61 ExtensionSystemImpl::Shared::Shared(Profile* profile) | 61 ExtensionSystemImpl::Shared::Shared(Profile* profile) |
62 : profile_(profile) { | 62 : profile_(profile) { |
63 } | 63 } |
64 | 64 |
65 ExtensionSystemImpl::Shared::~Shared() { | 65 ExtensionSystemImpl::Shared::~Shared() { |
66 rules_registry_service_->Shutdown(); | |
Matt Perry
2012/04/12 21:46:19
When is this called? If it's during shutdown, then
battre
2012/04/12 22:20:52
ExtensionSystemImpl::Shared is ref counted so it i
| |
66 } | 67 } |
67 | 68 |
68 void ExtensionSystemImpl::Shared::InitPrefs() { | 69 void ExtensionSystemImpl::Shared::InitPrefs() { |
69 bool extensions_disabled = | 70 bool extensions_disabled = |
70 profile_->GetPrefs()->GetBoolean(prefs::kDisableExtensions) || | 71 profile_->GetPrefs()->GetBoolean(prefs::kDisableExtensions) || |
71 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); | 72 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); |
72 extension_prefs_.reset(new ExtensionPrefs( | 73 extension_prefs_.reset(new ExtensionPrefs( |
73 profile_->GetPrefs(), | 74 profile_->GetPrefs(), |
74 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), | 75 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), |
75 ExtensionPrefValueMapFactory::GetForProfile(profile_))); | 76 ExtensionPrefValueMapFactory::GetForProfile(profile_))); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 } | 311 } |
311 | 312 |
312 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 313 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
313 const std::string& extension_id, | 314 const std::string& extension_id, |
314 const extension_misc::UnloadedExtensionReason reason) { | 315 const extension_misc::UnloadedExtensionReason reason) { |
315 BrowserThread::PostTask( | 316 BrowserThread::PostTask( |
316 BrowserThread::IO, FROM_HERE, | 317 BrowserThread::IO, FROM_HERE, |
317 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), | 318 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), |
318 extension_id, reason)); | 319 extension_id, reason)); |
319 } | 320 } |
OLD | NEW |