Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / app_list / test / fake_profile.h
blobce56c3d63c9cd4343e256a9e7ef664cce381cff3
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_H_
6 #define CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_
8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/sequenced_task_runner.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "components/domain_reliability/clear_mode.h"
13 #include "content/public/browser/browser_context.h"
15 class ResourceContext;
17 namespace net {
18 class URLRequestContextGetter;
21 namespace content {
22 class DownloadManagerDelegate;
23 class ResourceContext;
24 class SSLHostStateDelegate;
25 class ZoomLevelDelegate;
28 class FakeProfile : public Profile {
29 public:
30 explicit FakeProfile(const std::string& name);
31 FakeProfile(const std::string& name, const base::FilePath& path);
33 // Profile overrides.
34 std::string GetProfileUserName() const override;
35 ProfileType GetProfileType() const override;
36 base::FilePath GetPath() const override;
37 scoped_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
38 const base::FilePath& partition_path) override;
39 bool IsOffTheRecord() const override;
40 content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
41 net::URLRequestContextGetter* GetRequestContextForRenderProcess(
42 int renderer_child_id) override;
43 net::URLRequestContextGetter* GetMediaRequestContext() override;
44 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
45 int renderer_child_id) override;
46 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
47 const base::FilePath& partition_path,
48 bool in_memory) override;
49 content::ResourceContext* GetResourceContext() override;
50 content::BrowserPluginGuestManager* GetGuestManager() override;
51 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
52 content::PushMessagingService* GetPushMessagingService() override;
53 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
54 content::PermissionManager* GetPermissionManager() override;
55 scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
56 Profile* GetOffTheRecordProfile() override;
57 void DestroyOffTheRecordProfile() override;
58 bool HasOffTheRecordProfile() override;
59 Profile* GetOriginalProfile() override;
60 bool IsSupervised() const override;
61 bool IsChild() const override;
62 bool IsLegacySupervised() const override;
63 ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
64 PrefService* GetPrefs() override;
65 const PrefService* GetPrefs() const override;
66 PrefService* GetOffTheRecordPrefs() override;
67 net::URLRequestContextGetter* GetRequestContext() override;
68 net::URLRequestContextGetter* GetRequestContextForExtensions() override;
69 net::SSLConfigService* GetSSLConfigService() override;
70 bool IsSameProfile(Profile* profile) override;
71 base::Time GetStartTime() const override;
72 net::URLRequestContextGetter* CreateRequestContext(
73 content::ProtocolHandlerMap* protocol_handlers,
74 content::URLRequestInterceptorScopedVector request_interceptors) override;
75 net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
76 const base::FilePath& partition_path,
77 bool in_memory,
78 content::ProtocolHandlerMap* protocol_handlers,
79 content::URLRequestInterceptorScopedVector request_interceptors) override;
80 base::FilePath last_selected_directory() override;
81 void set_last_selected_directory(const base::FilePath& path) override;
83 #if defined(OS_CHROMEOS)
84 void ChangeAppLocale(const std::string& locale,
85 AppLocaleChangedVia via) override;
86 void OnLogin() override;
87 void InitChromeOSPreferences() override;
88 #endif // defined(OS_CHROMEOS)
90 PrefProxyConfigTracker* GetProxyConfigTracker() override;
91 chrome_browser_net::Predictor* GetNetworkPredictor() override;
92 DevToolsNetworkControllerHandle* GetDevToolsNetworkControllerHandle()
93 override;
94 void ClearNetworkingHistorySince(base::Time time,
95 const base::Closure& completion) override;
96 GURL GetHomePage() override;
97 bool WasCreatedByVersionOrLater(const std::string& version) override;
98 void SetExitType(ExitType exit_type) override;
99 ExitType GetLastSessionExitType() override;
101 private:
102 std::string name_;
103 base::FilePath path_;
106 #endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_