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

Side by Side Diff: chrome/browser/profiles/profile_loader.h

Issue 16766003: Move ProfileLoader to chrome/browser/profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ProfileLoader to chrome/browser/profiles/ Created 7 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_LOADER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_LOADER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 11
12 namespace base { 12 namespace base {
13 class FilePath; 13 class FilePath;
14 } 14 }
15 15
16 class ProfileManager; 16 class ProfileManager;
17 17
18 class ProfileLoader { 18 class ProfileLoader {
sail 2013/06/13 15:10:16 Needs class comments describing why someone might
jackhou1 2013/06/14 09:13:28 Done.
19 public: 19 public:
20 explicit ProfileLoader(ProfileManager* profile_manager); 20 explicit ProfileLoader(ProfileManager* profile_manager);
21 ~ProfileLoader(); 21 ~ProfileLoader();
22 22
23 bool AnyProfilesLoading() const; 23 bool AnyProfilesLoading() const;
sail 2013/06/13 15:10:16 How about IsAnyProfileLoading() ?
jackhou1 2013/06/14 09:13:28 Done.
24 void InvalidatePendingProfileLoads(); 24 void InvalidatePendingProfileLoads();
25 void LoadProfileInvalidatingOtherLoads( 25 void LoadProfileInvalidatingOtherLoads(
26 const base::FilePath& profile_file_path, 26 const base::FilePath& profile_file_path,
27 base::Callback<void(Profile*)> callback); 27 base::Callback<void(Profile*)> callback);
28 28
29 private: 29 private:
30 void OnProfileLoaded(int profile_load_sequence_id, 30 void OnProfileLoaded(int profile_load_sequence_id,
31 base::Callback<void(Profile*)> callback, 31 base::Callback<void(Profile*)> callback,
32 Profile* profile, 32 Profile* profile,
33 Profile::CreateStatus status); 33 Profile::CreateStatus status);
34 34
35 void IncrementPendingProfileLoads(); 35 void IncrementPendingProfileLoads();
36 void DecrementPendingProfileLoads(); 36 void DecrementPendingProfileLoads();
37 37
38 private: 38 private:
39 ProfileManager* profile_manager_; 39 ProfileManager* profile_manager_;
40 int profile_load_sequence_id_; 40 int profile_load_sequence_id_;
41 int pending_profile_loads_; 41 int pending_profile_loads_;
42 42
43 base::WeakPtrFactory<ProfileLoader> weak_factory_; 43 base::WeakPtrFactory<ProfileLoader> weak_factory_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(ProfileLoader); 45 DISALLOW_COPY_AND_ASSIGN(ProfileLoader);
46 }; 46 };
47 47
48 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ 48 #endif // CHROME_BROWSER_PROFILES_PROFILE_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698