Chromium Code Reviews| Index: chrome/browser/ui/app_list/test/fake_profile_store.h |
| diff --git a/chrome/browser/ui/app_list/test/fake_profile_store.h b/chrome/browser/ui/app_list/test/fake_profile_store.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b5861fd49dcd9f9faf73769db4a90038884f6c17 |
| --- /dev/null |
| +++ b/chrome/browser/ui/app_list/test/fake_profile_store.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_ |
| +#define CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_ |
| + |
| +#include <map> |
| + |
| +#include "base/callback.h" |
| +#include "chrome/browser/ui/app_list/profile_store.h" |
| + |
| +class FakeProfileStore : public ProfileStore { |
| + public: |
| + explicit FakeProfileStore(const base::FilePath& user_data_dir); |
| + |
| + void RunCallbackByPath(const base::FilePath& path, Profile* profile); |
|
benwells
2013/09/26 06:55:29
Can you add a comment about what this method does,
koz (OOO until 15th September)
2013/09/26 22:12:47
I added a pair of more general functions LoadProfi
|
| + |
| + // ProfileStore overrides. |
| + virtual void AddProfileObserver(ProfileInfoCacheObserver* observer) OVERRIDE; |
| + virtual void LoadProfileAsync( |
| + const base::FilePath& path, |
| + base::Callback<void(Profile*)> callback) OVERRIDE; |
| + virtual Profile* GetProfileByPath(const base::FilePath& path) OVERRIDE; |
| + virtual base::FilePath GetUserDataDir() OVERRIDE; |
| + virtual bool IsProfileManaged(const base::FilePath& path) OVERRIDE; |
| + |
| + private: |
| + base::FilePath user_data_dir_; |
| + std::map<base::FilePath, base::Callback<void(Profile*)> > callbacks_; |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_STORE_H_ |