Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: content/shell/shell_browser_context.cc

Issue 7989001: Remove use of default request context and fix use of speech censor flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separate overriden methods in profile_impl.h Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/test/test_browser_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/shell_browser_context.h" 5 #include "content/shell/shell_browser_context.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/browser/appcache/chrome_appcache_service.h" 10 #include "content/browser/appcache/chrome_appcache_service.h"
11 #include "content/browser/browser_thread.h" 11 #include "content/browser/browser_thread.h"
12 #include "content/browser/chrome_blob_storage_context.h" 12 #include "content/browser/chrome_blob_storage_context.h"
13 #include "content/browser/download/download_manager.h" 13 #include "content/browser/download/download_manager.h"
14 #include "content/browser/download/download_status_updater.h" 14 #include "content/browser/download/download_status_updater.h"
15 #include "content/browser/download/mock_download_manager_delegate.h" 15 #include "content/browser/download/mock_download_manager_delegate.h"
16 #include "content/browser/file_system/browser_file_system_helper.h" 16 #include "content/browser/file_system/browser_file_system_helper.h"
17 #include "content/browser/geolocation/geolocation_permission_context.h" 17 #include "content/browser/geolocation/geolocation_permission_context.h"
18 #include "content/browser/host_zoom_map.h" 18 #include "content/browser/host_zoom_map.h"
19 #include "content/browser/in_process_webkit/webkit_context.h" 19 #include "content/browser/in_process_webkit/webkit_context.h"
20 #include "content/browser/ssl/ssl_host_state.h" 20 #include "content/browser/ssl/ssl_host_state.h"
21 #include "content/browser/speech/speech_input_preferences.h"
21 #include "content/shell/shell_browser_main.h" 22 #include "content/shell/shell_browser_main.h"
22 #include "content/shell/shell_resource_context.h" 23 #include "content/shell/shell_resource_context.h"
23 #include "content/shell/shell_url_request_context_getter.h" 24 #include "content/shell/shell_url_request_context_getter.h"
24 #include "webkit/database/database_tracker.h" 25 #include "webkit/database/database_tracker.h"
25 #include "webkit/quota/quota_manager.h" 26 #include "webkit/quota/quota_manager.h"
26 27
27 #if defined(OS_WIN) 28 #if defined(OS_WIN)
28 #include "base/base_paths_win.h" 29 #include "base/base_paths_win.h"
29 #endif 30 #endif
30 31
(...skipping 18 matching lines...) Expand all
49 int render_view_id, 50 int render_view_id,
50 int bridge_id, 51 int bridge_id,
51 const GURL& requesting_frame) OVERRIDE { 52 const GURL& requesting_frame) OVERRIDE {
52 NOTIMPLEMENTED(); 53 NOTIMPLEMENTED();
53 } 54 }
54 55
55 private: 56 private:
56 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); 57 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext);
57 }; 58 };
58 59
60 class ShellSpeechInputPreferences : public SpeechInputPreferences {
61 public:
62 ShellSpeechInputPreferences() {
63 }
64
65 // SpeechInputPreferences implementation.
66 virtual bool censor_results() const OVERRIDE {
67 return false;
68 }
69
70 virtual void set_censor_results(bool censor_results) OVERRIDE {
71 }
72
73 private:
74 DISALLOW_COPY_AND_ASSIGN(ShellSpeechInputPreferences);
75 };
76
59 } // namespace 77 } // namespace
60 78
61 namespace content { 79 namespace content {
62 80
63 ShellBrowserContext::ShellBrowserContext( 81 ShellBrowserContext::ShellBrowserContext(
64 ShellBrowserMainParts* shell_main_parts) 82 ShellBrowserMainParts* shell_main_parts)
65 : shell_main_parts_(shell_main_parts) { 83 : shell_main_parts_(shell_main_parts) {
66 } 84 }
67 85
68 ShellBrowserContext::~ShellBrowserContext() { 86 ShellBrowserContext::~ShellBrowserContext() {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 171
154 GeolocationPermissionContext* 172 GeolocationPermissionContext*
155 ShellBrowserContext::GetGeolocationPermissionContext() { 173 ShellBrowserContext::GetGeolocationPermissionContext() {
156 if (!geolocation_permission_context_) { 174 if (!geolocation_permission_context_) {
157 geolocation_permission_context_ = 175 geolocation_permission_context_ =
158 new ShellGeolocationPermissionContext(); 176 new ShellGeolocationPermissionContext();
159 } 177 }
160 return geolocation_permission_context_; 178 return geolocation_permission_context_;
161 } 179 }
162 180
181 SpeechInputPreferences* ShellBrowserContext::GetSpeechInputPreferences() {
182 if (!speech_input_preferences_.get())
183 speech_input_preferences_ = new ShellSpeechInputPreferences();
184 return speech_input_preferences_.get();
185 }
186
163 bool ShellBrowserContext::DidLastSessionExitCleanly() { 187 bool ShellBrowserContext::DidLastSessionExitCleanly() {
164 return true; 188 return true;
165 } 189 }
166 190
167 quota::QuotaManager* ShellBrowserContext::GetQuotaManager() { 191 quota::QuotaManager* ShellBrowserContext::GetQuotaManager() {
168 CreateQuotaManagerAndClients(); 192 CreateQuotaManagerAndClients();
169 return quota_manager_.get(); 193 return quota_manager_.get();
170 } 194 }
171 195
172 WebKitContext* ShellBrowserContext::GetWebKitContext() { 196 WebKitContext* ShellBrowserContext::GetWebKitContext() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 NewRunnableMethod( 250 NewRunnableMethod(
227 appcache_service_.get(), 251 appcache_service_.get(),
228 &ChromeAppCacheService::InitializeOnIOThread, 252 &ChromeAppCacheService::InitializeOnIOThread,
229 IsOffTheRecord() 253 IsOffTheRecord()
230 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), 254 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")),
231 &GetResourceContext(), 255 &GetResourceContext(),
232 special_storage_policy)); 256 special_storage_policy));
233 } 257 }
234 258
235 } // namespace content 259 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698