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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } // namespace | 284 } // namespace |
285 | 285 |
286 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { | 286 void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { |
287 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 287 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
288 | 288 |
289 navigation_observer_.reset(new NavigationObserver(profile_)); | 289 navigation_observer_.reset(new NavigationObserver(profile_)); |
290 | 290 |
291 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); | 291 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); |
292 ExtensionErrorReporter::Init(allow_noisy_errors); | 292 ExtensionErrorReporter::Init(allow_noisy_errors); |
293 | 293 |
294 user_script_master_ = new UserScriptMaster(profile_); | 294 user_script_master_.reset(new UserScriptMaster(profile_)); |
295 | 295 |
296 // ExtensionService depends on RuntimeData. | 296 // ExtensionService depends on RuntimeData. |
297 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); | 297 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); |
298 | 298 |
299 bool autoupdate_enabled = !profile_->IsGuestSession(); | 299 bool autoupdate_enabled = !profile_->IsGuestSession(); |
300 #if defined(OS_CHROMEOS) | 300 #if defined(OS_CHROMEOS) |
301 if (!extensions_enabled) | 301 if (!extensions_enabled) |
302 autoupdate_enabled = false; | 302 autoupdate_enabled = false; |
303 #endif | 303 #endif |
304 extension_service_.reset(new ExtensionService( | 304 extension_service_.reset(new ExtensionService( |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 610 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
611 const std::string& extension_id, | 611 const std::string& extension_id, |
612 const UnloadedExtensionInfo::Reason reason) { | 612 const UnloadedExtensionInfo::Reason reason) { |
613 BrowserThread::PostTask( | 613 BrowserThread::PostTask( |
614 BrowserThread::IO, | 614 BrowserThread::IO, |
615 FROM_HERE, | 615 FROM_HERE, |
616 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 616 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
617 } | 617 } |
618 | 618 |
619 } // namespace extensions | 619 } // namespace extensions |
OLD | NEW |