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

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

Issue 10590004: [cros] Fake a stub user login when no --login-manager and --login-user are given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments and mock expectations. Created 8 years, 6 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 <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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ProfileManager::FindOrCreateNewWindowForProfile( 157 ProfileManager::FindOrCreateNewWindowForProfile(
158 profile, 158 profile,
159 browser::startup::IS_PROCESS_STARTUP, 159 browser::startup::IS_PROCESS_STARTUP,
160 browser::startup::IS_FIRST_RUN, 160 browser::startup::IS_FIRST_RUN,
161 false); 161 false);
162 } 162 }
163 } 163 }
164 164
165 } // namespace 165 } // namespace
166 166
167 // static
168 #if defined(OS_CHROMEOS)
sail 2012/06/22 18:46:56 This code is getting increasingly hard to follow.
169 const char ProfileManager::kTestUserProfile[] = "test-user";
170 #else
171 const char ProfileManager::kTestUserProfile[] = "Default";
172 #endif
173
167 #if defined(ENABLE_SESSION_SERVICE) 174 #if defined(ENABLE_SESSION_SERVICE)
168 // static 175 // static
169 void ProfileManager::ShutdownSessionServices() { 176 void ProfileManager::ShutdownSessionServices() {
170 ProfileManager* pm = g_browser_process->profile_manager(); 177 ProfileManager* pm = g_browser_process->profile_manager();
171 if (!pm) // Is NULL when running unit tests. 178 if (!pm) // Is NULL when running unit tests.
172 return; 179 return;
173 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); 180 std::vector<Profile*> profiles(pm->GetLoadedProfiles());
174 for (size_t i = 0; i < profiles.size(); ++i) 181 for (size_t i = 0; i < profiles.size(); ++i)
175 SessionServiceFactory::ShutdownForProfile(profiles[i]); 182 SessionServiceFactory::ShutdownForProfile(profiles[i]);
176 } 183 }
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks, 993 void ProfileManager::RunCallbacks(const std::vector<CreateCallback>& callbacks,
987 Profile* profile, 994 Profile* profile,
988 Profile::CreateStatus status) { 995 Profile::CreateStatus status) {
989 for (size_t i = 0; i < callbacks.size(); ++i) 996 for (size_t i = 0; i < callbacks.size(); ++i)
990 callbacks[i].Run(profile, status); 997 callbacks[i].Run(profile, status);
991 } 998 }
992 999
993 ProfileManager::ProfileInfo::~ProfileInfo() { 1000 ProfileManager::ProfileInfo::~ProfileInfo() {
994 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); 1001 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release());
995 } 1002 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698