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

Side by Side Diff: chrome/browser/ui/app_list/profile_loader.cc

Issue 2899083003: Delete unused tutorial code from profile switcher/user manager. (Closed)
Patch Set: fix merge Created 3 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
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/ui/app_list/profile_loader.h" 5 #include "chrome/browser/ui/app_list/profile_loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/lifetime/keep_alive_types.h" 9 #include "chrome/browser/lifetime/keep_alive_types.h"
10 #include "chrome/browser/lifetime/scoped_keep_alive.h" 10 #include "chrome/browser/lifetime/scoped_keep_alive.h"
(...skipping 18 matching lines...) Expand all
29 ++profile_load_sequence_id_; 29 ++profile_load_sequence_id_;
30 } 30 }
31 31
32 void ProfileLoader::LoadProfileInvalidatingOtherLoads( 32 void ProfileLoader::LoadProfileInvalidatingOtherLoads(
33 const base::FilePath& profile_file_path, 33 const base::FilePath& profile_file_path,
34 base::Callback<void(Profile*)> callback) { 34 base::Callback<void(Profile*)> callback) {
35 InvalidatePendingProfileLoads(); 35 InvalidatePendingProfileLoads();
36 36
37 if (profile_store_->IsProfileLocked(profile_file_path)) { 37 if (profile_store_->IsProfileLocked(profile_file_path)) {
38 UserManager::Show(base::FilePath(), 38 UserManager::Show(base::FilePath(),
39 profiles::USER_MANAGER_NO_TUTORIAL,
40 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER); 39 profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER);
41 return; 40 return;
42 } 41 }
43 42
44 Profile* profile = profile_store_->GetProfileByPath(profile_file_path); 43 Profile* profile = profile_store_->GetProfileByPath(profile_file_path);
45 if (profile) { 44 if (profile) {
46 callback.Run(profile); 45 callback.Run(profile);
47 return; 46 return;
48 } 47 }
49 48
(...skipping 19 matching lines...) Expand all
69 if (pending_profile_loads_ == 1) 68 if (pending_profile_loads_ == 1)
70 keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::PROFILE_LOADER, 69 keep_alive_.reset(new ScopedKeepAlive(KeepAliveOrigin::PROFILE_LOADER,
71 KeepAliveRestartOption::DISABLED)); 70 KeepAliveRestartOption::DISABLED));
72 } 71 }
73 72
74 void ProfileLoader::DecrementPendingProfileLoads() { 73 void ProfileLoader::DecrementPendingProfileLoads() {
75 pending_profile_loads_--; 74 pending_profile_loads_--;
76 if (pending_profile_loads_ == 0) 75 if (pending_profile_loads_ == 0)
77 keep_alive_.reset(); 76 keep_alive_.reset();
78 } 77 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_disabled.cc ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698