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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions Created 5 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 command_controller_(new chrome::BrowserCommandController(this)), 358 command_controller_(new chrome::BrowserCommandController(this)),
359 window_has_shown_(false), 359 window_has_shown_(false),
360 chrome_updater_factory_(this), 360 chrome_updater_factory_(this),
361 weak_factory_(this) { 361 weak_factory_(this) {
362 // If this causes a crash then a window is being opened using a profile type 362 // If this causes a crash then a window is being opened using a profile type
363 // that is disallowed by policy. The crash prevents the disabled window type 363 // that is disallowed by policy. The crash prevents the disabled window type
364 // from opening at all, but the path that triggered it should be fixed. 364 // from opening at all, but the path that triggered it should be fixed.
365 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); 365 CHECK(IncognitoModePrefs::CanOpenBrowser(profile_));
366 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) 366 CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord())
367 << "Only off the record browser may be opened in guest mode"; 367 << "Only off the record browser may be opened in guest mode";
368 DCHECK(!profile_->IsSystemProfile())
369 << "The system profile should never have a real browser.";
370 // TODO(mlerman): After this hits stable channel, see if there are counts
371 // for this metric. If not, change the DCHECK above to a CHECK.
372 if (profile_->IsSystemProfile())
373 content::RecordAction(base::UserMetricsAction("BrowserForSystemProfile"));
368 374
369 // TODO(jeremy): Move to initializer list once flag is removed. 375 // TODO(jeremy): Move to initializer list once flag is removed.
370 if (IsFastTabUnloadEnabled()) 376 if (IsFastTabUnloadEnabled())
371 fast_unload_controller_.reset(new chrome::FastUnloadController(this)); 377 fast_unload_controller_.reset(new chrome::FastUnloadController(this));
372 else 378 else
373 unload_controller_.reset(new chrome::UnloadController(this)); 379 unload_controller_.reset(new chrome::UnloadController(this));
374 380
375 tab_strip_model_->AddObserver(this); 381 tab_strip_model_->AddObserver(this);
376 382
377 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get())); 383 toolbar_model_.reset(new ToolbarModelImpl(toolbar_model_delegate_.get()));
(...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 if (contents && !allow_js_access) { 2608 if (contents && !allow_js_access) {
2603 contents->web_contents()->GetController().LoadURL( 2609 contents->web_contents()->GetController().LoadURL(
2604 target_url, 2610 target_url,
2605 content::Referrer(), 2611 content::Referrer(),
2606 ui::PAGE_TRANSITION_LINK, 2612 ui::PAGE_TRANSITION_LINK,
2607 std::string()); // No extra headers. 2613 std::string()); // No extra headers.
2608 } 2614 }
2609 2615
2610 return contents != NULL; 2616 return contents != NULL;
2611 } 2617 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698