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

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

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 9 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 (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/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> // For max(). 9 #include <algorithm> // For max().
10 #include <set> 10 #include <set>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #if defined(USE_ASH) 80 #if defined(USE_ASH)
81 #include "ash/shell.h" 81 #include "ash/shell.h"
82 #endif 82 #endif
83 83
84 #if defined(OS_CHROMEOS) 84 #if defined(OS_CHROMEOS)
85 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h" 85 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h"
86 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 86 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
87 #include "chrome/browser/chromeos/profiles/profile_helper.h" 87 #include "chrome/browser/chromeos/profiles/profile_helper.h"
88 #include "chrome/browser/lifetime/application_lifetime.h" 88 #include "chrome/browser/lifetime/application_lifetime.h"
89 #include "chromeos/chromeos_switches.h" 89 #include "chromeos/chromeos_switches.h"
90 #include "chromeos/cryptohome/cryptohome_parameters.h"
90 #include "components/user_manager/user_manager.h" 91 #include "components/user_manager/user_manager.h"
91 #endif 92 #endif
92 93
93 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) 94 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
94 #include "ui/events/devices/x11/touch_factory_x11.h" 95 #include "ui/events/devices/x11/touch_factory_x11.h"
95 #endif 96 #endif
96 97
97 #if defined(OS_MACOSX) 98 #if defined(OS_MACOSX)
98 #include "chrome/browser/web_applications/web_app_mac.h" 99 #include "chrome/browser/web_applications/web_app_mac.h"
99 #endif 100 #endif
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 command_line.GetSwitchValueASCII(switches::kAppId)); 656 command_line.GetSwitchValueASCII(switches::kAppId));
656 657
657 // Skip browser launch since app mode launches its app window. 658 // Skip browser launch since app mode launches its app window.
658 silent_launch = true; 659 silent_launch = true;
659 } 660 }
660 661
661 // If we are a demo app session and we crashed, there is no safe recovery 662 // If we are a demo app session and we crashed, there is no safe recovery
662 // possible. We should instead cleanly exit and go back to the OOBE screen, 663 // possible. We should instead cleanly exit and go back to the OOBE screen,
663 // where we will launch again after the timeout has expired. 664 // where we will launch again after the timeout has expired.
664 if (chromeos::DemoAppLauncher::IsDemoAppSession( 665 if (chromeos::DemoAppLauncher::IsDemoAppSession(
665 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))) { 666 cryptohome::Identification::FromString(
667 command_line.GetSwitchValueASCII(chromeos::switches::kLoginUser))
668 .GetAccountId())) {
666 chrome::AttemptUserExit(); 669 chrome::AttemptUserExit();
667 return false; 670 return false;
668 } 671 }
669 #endif // OS_CHROMEOS 672 #endif // OS_CHROMEOS
670 673
671 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) 674 #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
672 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); 675 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
673 #endif 676 #endif
674 677
675 #if defined(OS_MACOSX) 678 #if defined(OS_MACOSX)
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 } 921 }
919 922
920 // If we are showing the app list then chrome isn't shown so load the app 923 // If we are showing the app list then chrome isn't shown so load the app
921 // list's profile rather than chrome's. 924 // list's profile rather than chrome's.
922 if (command_line.HasSwitch(switches::kShowAppList)) 925 if (command_line.HasSwitch(switches::kShowAppList))
923 return AppListService::Get()->GetProfilePath(user_data_dir); 926 return AppListService::Get()->GetProfilePath(user_data_dir);
924 927
925 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 928 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
926 user_data_dir); 929 user_data_dir);
927 } 930 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698