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

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

Issue 164333007: Switch guest profile from forced-incognito to UI mods like ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed review comments by msw Created 6 years, 10 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 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 navigation_observer_.reset(new NavigationObserver(profile_)); 143 navigation_observer_.reset(new NavigationObserver(profile_));
144 144
145 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs); 145 bool allow_noisy_errors = !command_line->HasSwitch(switches::kNoErrorDialogs);
146 ExtensionErrorReporter::Init(allow_noisy_errors); 146 ExtensionErrorReporter::Init(allow_noisy_errors);
147 147
148 user_script_master_ = new UserScriptMaster(profile_); 148 user_script_master_ = new UserScriptMaster(profile_);
149 149
150 // ExtensionService depends on RuntimeData. 150 // ExtensionService depends on RuntimeData.
151 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); 151 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_)));
152 152
153 bool autoupdate_enabled = true; 153 bool autoupdate_enabled = !profile_->IsGuestSession();
154 #if defined(OS_CHROMEOS) 154 #if defined(OS_CHROMEOS)
155 if (!extensions_enabled) 155 if (!extensions_enabled)
156 autoupdate_enabled = false; 156 autoupdate_enabled = false;
157 else
158 autoupdate_enabled =
159 !command_line->HasSwitch(chromeos::switches::kGuestSession);
160 #endif 157 #endif
161 extension_service_.reset(new ExtensionService( 158 extension_service_.reset(new ExtensionService(
162 profile_, 159 profile_,
163 CommandLine::ForCurrentProcess(), 160 CommandLine::ForCurrentProcess(),
164 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), 161 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName),
165 ExtensionPrefs::Get(profile_), 162 ExtensionPrefs::Get(profile_),
166 blacklist_.get(), 163 blacklist_.get(),
167 autoupdate_enabled, 164 autoupdate_enabled,
168 extensions_enabled, 165 extensions_enabled,
169 &ready_)); 166 &ready_));
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 434 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
438 const std::string& extension_id, 435 const std::string& extension_id,
439 const UnloadedExtensionInfo::Reason reason) { 436 const UnloadedExtensionInfo::Reason reason) {
440 BrowserThread::PostTask( 437 BrowserThread::PostTask(
441 BrowserThread::IO, 438 BrowserThread::IO,
442 FROM_HERE, 439 FROM_HERE,
443 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 440 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
444 } 441 }
445 442
446 } // namespace extensions 443 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_extensions_browser_client.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698