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.
5 #ifndef CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_
10 #include "base/callback.h"
11 #include "base/observer_list.h"
12 #include "chrome/browser/ui/app_list/profile_store.h"
14 class FakeProfileStore : public ProfileStore {
16 explicit FakeProfileStore(const base::FilePath& user_data_dir);
17 virtual ~FakeProfileStore();
19 void LoadProfile(Profile* profile);
20 void RemoveProfile(Profile* profile);
22 // ProfileStore overrides.
23 virtual void AddProfileObserver(ProfileInfoCacheObserver* observer) OVERRIDE;
24 virtual void LoadProfileAsync(
25 const base::FilePath& path,
26 base::Callback<void(Profile*)> callback) OVERRIDE;
27 virtual Profile* GetProfileByPath(const base::FilePath& path) OVERRIDE;
28 virtual base::FilePath GetUserDataDir() OVERRIDE;
29 virtual bool IsProfileManaged(const base::FilePath& path) OVERRIDE;
32 base::FilePath user_data_dir_;
33 typedef std::map<base::FilePath, base::Callback<void(Profile*)> >
35 CallbacksByPath callbacks_;
36 ObserverList<ProfileInfoCacheObserver> observer_list_;
37 typedef std::map<base::FilePath, Profile*> ProfilesByPath;
38 ProfilesByPath loaded_profiles_;
41 #endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_