Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: chrome/browser/extensions/extension_system.cc

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "chrome/common/chrome_version_info.h" 43 #include "chrome/common/chrome_version_info.h"
44 #include "chrome/common/extensions/extension.h" 44 #include "chrome/common/extensions/extension.h"
45 #include "chrome/common/extensions/features/feature.h" 45 #include "chrome/common/extensions/features/feature.h"
46 #include "chrome/common/extensions/manifest.h" 46 #include "chrome/common/extensions/manifest.h"
47 #include "chrome/common/pref_names.h" 47 #include "chrome/common/pref_names.h"
48 #include "content/public/browser/browser_thread.h" 48 #include "content/public/browser/browser_thread.h"
49 #include "content/public/browser/url_data_source.h" 49 #include "content/public/browser/url_data_source.h"
50 50
51 #if defined(OS_CHROMEOS) 51 #if defined(OS_CHROMEOS)
52 #include "chrome/browser/chromeos/login/user_manager.h" 52 #include "chrome/browser/chromeos/login/user_manager.h"
53 #include "chromeos/chromeos_switches.h"
53 #endif 54 #endif
54 55
55 using content::BrowserThread; 56 using content::BrowserThread;
56 57
57 namespace extensions { 58 namespace extensions {
58 59
59 // 60 //
60 // ExtensionSystem 61 // ExtensionSystem
61 // 62 //
62 63
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); 134 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs);
134 ExtensionErrorReporter::Init(allow_noisy_errors); 135 ExtensionErrorReporter::Init(allow_noisy_errors);
135 136
136 user_script_master_ = new UserScriptMaster(profile_); 137 user_script_master_ = new UserScriptMaster(profile_);
137 138
138 bool autoupdate_enabled = true; 139 bool autoupdate_enabled = true;
139 #if defined(OS_CHROMEOS) 140 #if defined(OS_CHROMEOS)
140 if (!extensions_enabled) 141 if (!extensions_enabled)
141 autoupdate_enabled = false; 142 autoupdate_enabled = false;
142 else 143 else
143 autoupdate_enabled = !command_line->HasSwitch(switches::kGuestSession); 144 autoupdate_enabled =
145 !command_line->HasSwitch(chromeos::switches::kGuestSession);
144 #endif 146 #endif
145 extension_service_.reset(new ExtensionService( 147 extension_service_.reset(new ExtensionService(
146 profile_, 148 profile_,
147 CommandLine::ForCurrentProcess(), 149 CommandLine::ForCurrentProcess(),
148 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), 150 profile_->GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
149 extension_prefs_.get(), 151 extension_prefs_.get(),
150 blacklist_.get(), 152 blacklist_.get(),
151 autoupdate_enabled, 153 autoupdate_enabled,
152 extensions_enabled)); 154 extensions_enabled));
153 155
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 458 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
457 const std::string& extension_id, 459 const std::string& extension_id,
458 const extension_misc::UnloadedExtensionReason reason) { 460 const extension_misc::UnloadedExtensionReason reason) {
459 BrowserThread::PostTask( 461 BrowserThread::PostTask(
460 BrowserThread::IO, FROM_HERE, 462 BrowserThread::IO, FROM_HERE,
461 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), 463 base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(),
462 extension_id, reason)); 464 extension_id, reason));
463 } 465 }
464 466
465 } // namespace extensions 467 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698