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

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

Issue 16766003: Move ProfileLoader to chrome/browser/profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gyp-def out profile_loader* on android 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/profiles/profile.h"
11
12 namespace base {
13 class FilePath;
14 }
15
16 class ProfileManager;
17
18 class ProfileLoader {
19 public:
20 explicit ProfileLoader(ProfileManager* profile_manager);
21 ~ProfileLoader();
22
23 bool AnyProfilesLoading() const;
24 void InvalidatePendingProfileLoads();
25 void LoadProfileInvalidatingOtherLoads(
26 const base::FilePath& profile_file_path,
27 base::Callback<void(Profile*)> callback);
28
29 private:
30 void OnProfileLoaded(int profile_load_sequence_id,
31 base::Callback<void(Profile*)> callback,
32 Profile* profile,
33 Profile::CreateStatus status);
34
35 void IncrementPendingProfileLoads();
36 void DecrementPendingProfileLoads();
37
38 private:
39 ProfileManager* profile_manager_;
40 int profile_load_sequence_id_;
41 int pending_profile_loads_;
42
43 base::WeakPtrFactory<ProfileLoader> weak_factory_;
44
45 DISALLOW_COPY_AND_ASSIGN(ProfileLoader);
46 };
47
48 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.h ('k') | chrome/browser/ui/app_list/profile_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698