| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profiles/profile_window.h" | 5 #include "chrome/browser/profiles/profile_window.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 std::string page = chrome::kChromeUIUserManagerURL; | 195 std::string page = chrome::kChromeUIUserManagerURL; |
| 196 | 196 |
| 197 if (tutorial_mode == profiles::USER_MANAGER_TUTORIAL_OVERVIEW) { | 197 if (tutorial_mode == profiles::USER_MANAGER_TUTORIAL_OVERVIEW) { |
| 198 page += profiles::kUserManagerDisplayTutorial; | 198 page += profiles::kUserManagerDisplayTutorial; |
| 199 } else if (!profile_path_to_focus.empty()) { | 199 } else if (!profile_path_to_focus.empty()) { |
| 200 const ProfileInfoCache& cache = | 200 const ProfileInfoCache& cache = |
| 201 g_browser_process->profile_manager()->GetProfileInfoCache(); | 201 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| 202 size_t index = cache.GetIndexOfProfileWithPath(profile_path_to_focus); | 202 size_t index = cache.GetIndexOfProfileWithPath(profile_path_to_focus); |
| 203 if (index != std::string::npos) { | 203 if (index != std::string::npos) { |
| 204 page += "#"; | 204 page += "#"; |
| 205 page += base::IntToString(index); | 205 page += base::SizeTToString(index); |
| 206 } | 206 } |
| 207 } else if (profile_open_action == | 207 } else if (profile_open_action == |
| 208 profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER) { | 208 profiles::USER_MANAGER_SELECT_PROFILE_TASK_MANAGER) { |
| 209 page += profiles::kUserManagerSelectProfileTaskManager; | 209 page += profiles::kUserManagerSelectProfileTaskManager; |
| 210 } else if (profile_open_action == | 210 } else if (profile_open_action == |
| 211 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) { | 211 profiles::USER_MANAGER_SELECT_PROFILE_ABOUT_CHROME) { |
| 212 page += profiles::kUserManagerSelectProfileAboutChrome; | 212 page += profiles::kUserManagerSelectProfileAboutChrome; |
| 213 } else if (profile_open_action == | 213 } else if (profile_open_action == |
| 214 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_SETTINGS) { | 214 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_SETTINGS) { |
| 215 page += profiles::kUserManagerSelectProfileChromeSettings; | 215 page += profiles::kUserManagerSelectProfileChromeSettings; |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 PrefService* local_state = g_browser_process->local_state(); | 554 PrefService* local_state = g_browser_process->local_state(); |
| 555 const bool dismissed = local_state->GetBoolean( | 555 const bool dismissed = local_state->GetBoolean( |
| 556 prefs::kProfileAvatarRightClickTutorialDismissed); | 556 prefs::kProfileAvatarRightClickTutorialDismissed); |
| 557 | 557 |
| 558 // Don't show the tutorial if it's already been dismissed or if right-clicking | 558 // Don't show the tutorial if it's already been dismissed or if right-clicking |
| 559 // wouldn't show any targets. | 559 // wouldn't show any targets. |
| 560 return !dismissed && HasProfileSwitchTargets(profile); | 560 return !dismissed && HasProfileSwitchTargets(profile); |
| 561 } | 561 } |
| 562 | 562 |
| 563 } // namespace profiles | 563 } // namespace profiles |
| OLD | NEW |