| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_impl.h" | 5 #include "chrome/browser/extensions/extension_system_impl.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); | 303 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); |
| 304 ExtensionErrorReporter::Init(allow_noisy_errors); | 304 ExtensionErrorReporter::Init(allow_noisy_errors); |
| 305 | 305 |
| 306 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); | 306 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); |
| 307 declarative_user_script_manager_.reset( | 307 declarative_user_script_manager_.reset( |
| 308 new DeclarativeUserScriptManager(profile_)); | 308 new DeclarativeUserScriptManager(profile_)); |
| 309 | 309 |
| 310 // ExtensionService depends on RuntimeData. | 310 // ExtensionService depends on RuntimeData. |
| 311 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); | 311 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); |
| 312 | 312 |
| 313 bool autoupdate_enabled = !profile_->IsGuestSession(); | 313 bool autoupdate_enabled = !profile_->IsGuestSession() && |
| 314 !profile_->IsSystemProfile(); |
| 314 #if defined(OS_CHROMEOS) | 315 #if defined(OS_CHROMEOS) |
| 315 if (!extensions_enabled) | 316 if (!extensions_enabled) |
| 316 autoupdate_enabled = false; | 317 autoupdate_enabled = false; |
| 317 #endif // defined(OS_CHROMEOS) | 318 #endif // defined(OS_CHROMEOS) |
| 318 extension_service_.reset(new ExtensionService( | 319 extension_service_.reset(new ExtensionService( |
| 319 profile_, base::CommandLine::ForCurrentProcess(), | 320 profile_, base::CommandLine::ForCurrentProcess(), |
| 320 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), | 321 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), |
| 321 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), | 322 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), |
| 322 autoupdate_enabled, extensions_enabled, &ready_)); | 323 autoupdate_enabled, extensions_enabled, &ready_)); |
| 323 | 324 |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 585 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
| 585 const std::string& extension_id, | 586 const std::string& extension_id, |
| 586 const UnloadedExtensionInfo::Reason reason) { | 587 const UnloadedExtensionInfo::Reason reason) { |
| 587 BrowserThread::PostTask( | 588 BrowserThread::PostTask( |
| 588 BrowserThread::IO, | 589 BrowserThread::IO, |
| 589 FROM_HERE, | 590 FROM_HERE, |
| 590 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 591 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
| 591 } | 592 } |
| 592 | 593 |
| 593 } // namespace extensions | 594 } // namespace extensions |
| OLD | NEW |