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

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

Issue 229333002: [Win] Unbreak the user manager tuturial that I broke in r259326. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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 | « no previous file | chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm » ('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 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 base::Bind(&OnUserManagerGuestProfileCreated, 264 base::Bind(&OnUserManagerGuestProfileCreated,
265 profile_path_to_focus, 265 profile_path_to_focus,
266 tutorial_mode, 266 tutorial_mode,
267 callback), 267 callback),
268 base::string16(), 268 base::string16(),
269 base::string16(), 269 base::string16(),
270 std::string()); 270 std::string());
271 } 271 }
272 272
273 void ShowUserManagerMaybeWithTutorial(Profile* profile) { 273 void ShowUserManagerMaybeWithTutorial(Profile* profile) {
274 if (!profile) { 274 // Guest users cannot appear in the User Manager, nor display a tutorial.
275 if (!profile || profile->IsGuestSession()) {
275 chrome::ShowUserManager(base::FilePath()); 276 chrome::ShowUserManager(base::FilePath());
276 return; 277 return;
277 } 278 }
278 // Show the tutorial if the profile has not shown it before. 279 // Show the tutorial if the profile has not shown it before.
279 PrefService* pref_service = profile->GetPrefs(); 280 PrefService* pref_service = profile->GetPrefs();
280 bool tutorial_shown = pref_service->GetBoolean( 281 bool tutorial_shown = pref_service->GetBoolean(
281 prefs::kProfileUserManagerTutorialShown); 282 prefs::kProfileUserManagerTutorialShown);
282 if (!tutorial_shown) 283 if (!tutorial_shown)
283 pref_service->SetBoolean(prefs::kProfileUserManagerTutorialShown, true); 284 pref_service->SetBoolean(prefs::kProfileUserManagerTutorialShown, true);
284 285
285 if (tutorial_shown) { 286 if (tutorial_shown) {
286 chrome::ShowUserManager(profile->GetPath()); 287 chrome::ShowUserManager(profile->GetPath());
287 } else { 288 } else {
288 chrome::ShowUserManagerWithTutorial( 289 chrome::ShowUserManagerWithTutorial(
289 profiles::USER_MANAGER_TUTORIAL_OVERVIEW); 290 profiles::USER_MANAGER_TUTORIAL_OVERVIEW);
290 } 291 }
291 } 292 }
292 293
293 } // namespace profiles 294 } // namespace profiles
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698