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 #ifndef CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class FilePath; | 15 class FilePath; |
15 } | 16 } |
16 | 17 |
17 class Profile; | 18 class Profile; |
18 class ProfileLoaderUnittest; | 19 class ProfileLoaderUnittest; |
19 class ProfileStore; | 20 class ProfileStore; |
20 class ScopedKeepAlive; | 21 class ScopedKeepAlive; |
(...skipping 20 matching lines...) Expand all Loading... |
41 friend class ::ProfileLoaderUnittest; | 42 friend class ::ProfileLoaderUnittest; |
42 | 43 |
43 void OnProfileLoaded(int profile_load_sequence_id, | 44 void OnProfileLoaded(int profile_load_sequence_id, |
44 base::Callback<void(Profile*)> callback, | 45 base::Callback<void(Profile*)> callback, |
45 Profile* profile); | 46 Profile* profile); |
46 | 47 |
47 void IncrementPendingProfileLoads(); | 48 void IncrementPendingProfileLoads(); |
48 void DecrementPendingProfileLoads(); | 49 void DecrementPendingProfileLoads(); |
49 | 50 |
50 ProfileStore* profile_store_; | 51 ProfileStore* profile_store_; |
51 scoped_ptr<ScopedKeepAlive> keep_alive_; | 52 std::unique_ptr<ScopedKeepAlive> keep_alive_; |
52 int profile_load_sequence_id_; | 53 int profile_load_sequence_id_; |
53 int pending_profile_loads_; | 54 int pending_profile_loads_; |
54 | 55 |
55 base::WeakPtrFactory<ProfileLoader> weak_factory_; | 56 base::WeakPtrFactory<ProfileLoader> weak_factory_; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(ProfileLoader); | 58 DISALLOW_COPY_AND_ASSIGN(ProfileLoader); |
58 }; | 59 }; |
59 | 60 |
60 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ | 61 #endif // CHROME_BROWSER_UI_APP_LIST_PROFILE_LOADER_H_ |
OLD | NEW |