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

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

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 2 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
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/profiles/avatar_menu.cc » ('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) 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // On ChromeOS and Android the ProfileManager will use the same path as the 371 // On ChromeOS and Android the ProfileManager will use the same path as the
372 // one we got passed. GetActiveUserProfile will therefore use the correct path 372 // one we got passed. GetActiveUserProfile will therefore use the correct path
373 // automatically. 373 // automatically.
374 DCHECK_EQ(user_data_dir.value(), 374 DCHECK_EQ(user_data_dir.value(),
375 g_browser_process->profile_manager()->user_data_dir().value()); 375 g_browser_process->profile_manager()->user_data_dir().value());
376 profile = ProfileManager::GetActiveUserProfile(); 376 profile = ProfileManager::GetActiveUserProfile();
377 #else 377 #else
378 base::FilePath profile_path = 378 base::FilePath profile_path =
379 GetStartupProfilePath(user_data_dir, parsed_command_line); 379 GetStartupProfilePath(user_data_dir, parsed_command_line);
380 380
381 // Without NewAvatarMenu, replace guest with any existing profile.
382 if (!switches::IsNewAvatarMenu() &&
383 profile_path == ProfileManager::GetGuestProfilePath()) {
384 profile_path = g_browser_process->profile_manager()->GetProfileInfoCache().
385 GetPathOfProfileAtIndex(0);
386 }
387 profile = g_browser_process->profile_manager()->GetProfile( 381 profile = g_browser_process->profile_manager()->GetProfile(
388 profile_path); 382 profile_path);
389 383
390 // If we're using the --new-profile-management flag and this profile is 384 // If we're using the --new-profile-management flag and this profile is
391 // signed out, then we should show the user manager instead. By switching 385 // signed out, then we should show the user manager instead. By switching
392 // the active profile to the guest profile we ensure that no 386 // the active profile to the guest profile we ensure that no
393 // browser windows will be opened for the guest profile. 387 // browser windows will be opened for the guest profile.
394 if (switches::IsNewProfileManagement() && 388 if (switches::IsNewProfileManagement() &&
395 profile && 389 profile &&
396 !profile->IsGuestSession()) { 390 !profile->IsGuestSession()) {
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1836 chromeos::CrosSettings::Shutdown(); 1830 chromeos::CrosSettings::Shutdown();
1837 #endif // defined(OS_CHROMEOS) 1831 #endif // defined(OS_CHROMEOS)
1838 #endif // defined(OS_ANDROID) 1832 #endif // defined(OS_ANDROID)
1839 } 1833 }
1840 1834
1841 // Public members: 1835 // Public members:
1842 1836
1843 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1837 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1844 chrome_extra_parts_.push_back(parts); 1838 chrome_extra_parts_.push_back(parts);
1845 } 1839 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/profiles/avatar_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698