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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 7563023: Multi-Profiles: Remove new profile setup UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/new_profile.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <set> 5 #include <set>
6 6
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // The NewProfileLauncher class is created when to wait for a multi-profile 61 // The NewProfileLauncher class is created when to wait for a multi-profile
62 // to be created asynchronously. Upon completion of profile creation, the 62 // to be created asynchronously. Upon completion of profile creation, the
63 // NPL takes care of launching a new browser window and signing the user 63 // NPL takes care of launching a new browser window and signing the user
64 // in to their Google account. 64 // in to their Google account.
65 class NewProfileLauncher : public ProfileManagerObserver { 65 class NewProfileLauncher : public ProfileManagerObserver {
66 public: 66 public:
67 virtual void OnProfileCreated(Profile* profile, Status status) { 67 virtual void OnProfileCreated(Profile* profile, Status status) {
68 if (status == STATUS_INITIALIZED) { 68 if (status == STATUS_INITIALIZED) {
69 DCHECK(profile); 69 DCHECK(profile);
70 Browser* browser = Browser::Create(profile); 70 Browser* browser = Browser::Create(profile);
71 browser->AddSelectedTabWithURL(GURL(chrome::kChromeUINewProfile), 71 browser->AddSelectedTabWithURL(GURL(chrome::kChromeUINewTabURL),
72 PageTransition::LINK); 72 PageTransition::LINK);
73 browser->window()->Show(); 73 browser->window()->Show();
74 } 74 }
75 } 75 }
76 76
77 virtual bool DeleteAfter() OVERRIDE { return true; } 77 virtual bool DeleteAfter() OVERRIDE { return true; }
78 }; 78 };
79 79
80 // static 80 // static
81 void ProfileManager::ShutdownSessionServices() { 81 void ProfileManager::ShutdownSessionServices() {
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 cache.DeleteProfileFromCache(profile_dir); 560 cache.DeleteProfileFromCache(profile_dir);
561 } 561 }
562 562
563 // static 563 // static
564 bool ProfileManager::IsMultipleProfilesEnabled() { 564 bool ProfileManager::IsMultipleProfilesEnabled() {
565 #if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS) 565 #if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
566 return true; 566 return true;
567 #endif 567 #endif
568 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles); 568 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles);
569 } 569 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/resources/new_profile.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698