Chromium Code Reviews| Index: chrome/browser/ui/app_list/app_list_service_impl.h |
| diff --git a/chrome/browser/ui/app_list/app_list_service_impl.h b/chrome/browser/ui/app_list/app_list_service_impl.h |
| index 878b5ea181323f457a5f239f136e2d145e61c790..2ad41bbccd3baa58dfc9ecea4e25fd64b4f4b675 100644 |
| --- a/chrome/browser/ui/app_list/app_list_service_impl.h |
| +++ b/chrome/browser/ui/app_list/app_list_service_impl.h |
| @@ -8,13 +8,17 @@ |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "base/command_line.h" |
| #include "base/compiler_specific.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_info_cache_observer.h" |
| -#include "chrome/browser/profiles/profile_loader.h" |
| #include "chrome/browser/ui/app_list/app_list_service.h" |
| +#include "chrome/browser/ui/app_list/keep_alive_service.h" |
| +#include "chrome/browser/ui/app_list/profile_loader.h" |
| + |
| +class ProfileStore; |
| namespace base { |
| class FilePath; |
| @@ -26,21 +30,28 @@ class AppListServiceImpl : public AppListService, |
| public: |
| static void RecordAppListLaunch(); |
| static void RecordAppListAppLaunch(); |
| + virtual ~AppListServiceImpl(); |
| - protected: |
|
benwells
2013/09/27 09:00:40
Can we bring back protected? I like keeping visibi
koz (OOO until 15th September)
2013/09/30 00:53:27
Done. I've kept things that are public in the pare
|
| AppListServiceImpl(); |
| - virtual ~AppListServiceImpl(); |
| + // Constructor used for testing. |
| + AppListServiceImpl(const CommandLine& command_line, |
| + PrefService* local_state, |
| + scoped_ptr<ProfileStore> profile_store, |
| + scoped_ptr<KeepAliveService> keep_alive_service); |
| Profile* profile() const { return profile_; } |
| void SetProfile(Profile* new_profile); |
| void InvalidatePendingProfileLoads(); |
| - ProfileLoader& profile_loader() { return profile_loader_; } |
| - const ProfileLoader& profile_loader() const { return profile_loader_; } |
| + ProfileLoader& profile_loader() { return *profile_loader_; } |
| + const ProfileLoader& profile_loader() const { return *profile_loader_; } |
| // Process command line flags shared between desktop implementations of the |
| // app list. Currently this allows for enabling or disabling the app list. |
| void HandleCommandLineFlags(Profile* initial_profile); |
| + // Records UMA stats that try to approximate usage after a delay. |
| + void SendUsageStats(); |
| + |
| // Create a platform-specific shortcut for the app list. |
| virtual void CreateShortcut(); |
| @@ -76,16 +87,13 @@ class AppListServiceImpl : public AppListService, |
| // The profile the AppList is currently displaying. |
| Profile* profile_; |
| - |
| - // Incremented to indicate that pending profile loads are no longer valid. |
| - int profile_load_sequence_id_; |
| - |
| - // How many profile loads are pending. |
| - int pending_profile_loads_; |
| + scoped_ptr<ProfileStore> profile_store_; |
| base::WeakPtrFactory<AppListServiceImpl> weak_factory_; |
| - ProfileLoader profile_loader_; |
| + CommandLine command_line_; |
| + PrefService* local_state_; |
| + scoped_ptr<ProfileLoader> profile_loader_; |
| DISALLOW_COPY_AND_ASSIGN(AppListServiceImpl); |
| }; |