Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / app_list / test / fake_profile.h
blobd7f94dc1c53027fd287cd4521d89143b97c8690e
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 "content/public/browser/browser_context.h"
14 class ResourceContext;
16 namespace net {
17 class URLRequestContextGetter;
20 namespace content {
21 class DownloadManagerDelegate;
22 class GeolocationPermissionContext;
23 class ResourceContext;
26 class FakeProfile : public Profile {
27 public:
28 explicit FakeProfile(const std::string& name);
29 FakeProfile(const std::string& name, const base::FilePath& path);
31 // Profile overrides.
32 virtual std::string GetProfileName() OVERRIDE;
33 virtual base::FilePath GetPath() const OVERRIDE;
34 virtual bool IsOffTheRecord() const OVERRIDE;
35 virtual content::DownloadManagerDelegate*
36 GetDownloadManagerDelegate() OVERRIDE;
37 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
38 int renderer_child_id) OVERRIDE;
39 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
40 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
41 int renderer_child_id) OVERRIDE;
42 virtual net::URLRequestContextGetter*
43 GetMediaRequestContextForStoragePartition(
44 const base::FilePath& partition_path,
45 bool in_memory) OVERRIDE;
46 virtual void RequestMIDISysExPermission(
47 int render_process_id,
48 int render_view_id,
49 int bridge_id,
50 const GURL& requesting_frame,
51 const MIDISysExPermissionCallback& callback) OVERRIDE;
52 virtual void CancelMIDISysExPermissionRequest(
53 int render_process_id,
54 int render_view_id,
55 int bridge_id,
56 const GURL& requesting_frame) OVERRIDE;
57 virtual void RequestProtectedMediaIdentifierPermission(
58 int render_process_id,
59 int render_view_id,
60 int bridge_id,
61 int group_id,
62 const GURL& requesting_frame,
63 const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE;
64 virtual void CancelProtectedMediaIdentifierPermissionRequests(
65 int group_id) OVERRIDE;
66 virtual content::ResourceContext* GetResourceContext() OVERRIDE;
67 virtual content::GeolocationPermissionContext*
68 GetGeolocationPermissionContext() OVERRIDE;
69 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
70 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE;
71 virtual Profile* GetOffTheRecordProfile() OVERRIDE;
72 virtual void DestroyOffTheRecordProfile() OVERRIDE;
73 virtual bool HasOffTheRecordProfile() OVERRIDE;
74 virtual Profile* GetOriginalProfile() OVERRIDE;
75 virtual bool IsManaged() OVERRIDE;
76 virtual history::TopSites* GetTopSites() OVERRIDE;
77 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE;
78 virtual ExtensionService* GetExtensionService() OVERRIDE;
79 virtual ExtensionSpecialStoragePolicy*
80 GetExtensionSpecialStoragePolicy() OVERRIDE;
81 virtual PrefService* GetPrefs() OVERRIDE;
82 virtual PrefService* GetOffTheRecordPrefs() OVERRIDE;
83 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
84 virtual net::URLRequestContextGetter*
85 GetRequestContextForExtensions() OVERRIDE;
86 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
87 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
88 virtual bool IsSameProfile(Profile* profile) OVERRIDE;
89 virtual base::Time GetStartTime() const OVERRIDE;
90 virtual net::URLRequestContextGetter* CreateRequestContext(
91 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
92 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
93 const base::FilePath& partition_path,
94 bool in_memory,
95 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
96 virtual base::FilePath last_selected_directory() OVERRIDE;
97 virtual void set_last_selected_directory(const base::FilePath& path) OVERRIDE;
99 #if defined(OS_CHROMEOS)
100 virtual void ChangeAppLocale(
101 const std::string& locale, AppLocaleChangedVia via) OVERRIDE;
102 virtual void OnLogin() OVERRIDE;
103 virtual void InitChromeOSPreferences() OVERRIDE;
104 #endif // defined(OS_CHROMEOS)
106 virtual PrefProxyConfigTracker* GetProxyConfigTracker() OVERRIDE;
107 virtual chrome_browser_net::Predictor* GetNetworkPredictor() OVERRIDE;
108 virtual void ClearNetworkingHistorySince(
109 base::Time time, const base::Closure& completion) OVERRIDE;
110 virtual GURL GetHomePage() OVERRIDE;
111 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE;
112 virtual void SetExitType(ExitType exit_type) OVERRIDE;
113 virtual ExitType GetLastSessionExitType() OVERRIDE;
115 private:
116 std::string name_;
117 base::FilePath path_;
120 #endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_PROFILE_H_