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

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

Issue 10891016: Remove all callers of Profile::GetResourceContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 DownloadManager* manager = BrowserContext::GetDownloadManager(this); 86 DownloadManager* manager = BrowserContext::GetDownloadManager(this);
87 87
88 if (!download_manager_delegate_.get()) { 88 if (!download_manager_delegate_.get()) {
89 download_manager_delegate_ = new ShellDownloadManagerDelegate(); 89 download_manager_delegate_ = new ShellDownloadManagerDelegate();
90 download_manager_delegate_->SetDownloadManager(manager); 90 download_manager_delegate_->SetDownloadManager(manager);
91 } 91 }
92 92
93 return download_manager_delegate_.get(); 93 return download_manager_delegate_.get();
94 } 94 }
95 95
96 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { 96 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() {
97 if (!url_request_getter_) { 97 if (!url_request_getter_) {
98 url_request_getter_ = new ShellURLRequestContextGetter( 98 url_request_getter_ = new ShellURLRequestContextGetter(
99 GetPath(), 99 GetPath(),
100 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), 100 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
101 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE)); 101 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE));
102 } 102 }
103 return url_request_getter_; 103 return url_request_getter_;
104 } 104 }
105 105
106 net::URLRequestContextGetter* 106 net::URLRequestContextGetter*
107 ShellBrowserContext::GetRequestContextForRenderProcess( 107 ShellBrowserContext::GetRequestContextForRenderProcess(
108 int renderer_child_id) { 108 int renderer_child_id) {
109 return GetRequestContext(); 109 return GetRequestContext();
110 } 110 }
111 111
112 net::URLRequestContextGetter* 112 net::URLRequestContextGetter*
113 ShellBrowserContext::GetMediaRequestContext() { 113 ShellBrowserContext::GetMediaRequestContext() {
114 return GetRequestContext(); 114 return GetRequestContext();
115 } 115 }
116 116
117 net::URLRequestContextGetter* 117 net::URLRequestContextGetter*
118 ShellBrowserContext::GetMediaRequestContextForRenderProcess( 118 ShellBrowserContext::GetMediaRequestContextForRenderProcess(
119 int renderer_child_id) { 119 int renderer_child_id) {
120 return GetRequestContext(); 120 return GetRequestContext();
121 } 121 }
122 122
123 ResourceContext* ShellBrowserContext::GetResourceContext() { 123 ResourceContext* ShellBrowserContext::GetResourceContext(
124 SiteInstance* instance) {
124 if (!resource_context_.get()) { 125 if (!resource_context_.get()) {
125 resource_context_.reset(new ShellResourceContext( 126 resource_context_.reset(new ShellResourceContext(
126 static_cast<ShellURLRequestContextGetter*>(GetRequestContext()))); 127 static_cast<ShellURLRequestContextGetter*>(GetRequestContext())));
127 } 128 }
128 return resource_context_.get(); 129 return resource_context_.get();
129 } 130 }
130 131
131 GeolocationPermissionContext* 132 GeolocationPermissionContext*
132 ShellBrowserContext::GetGeolocationPermissionContext() { 133 ShellBrowserContext::GetGeolocationPermissionContext() {
133 return NULL; 134 return NULL;
134 } 135 }
135 136
136 SpeechRecognitionPreferences* 137 SpeechRecognitionPreferences*
137 ShellBrowserContext::GetSpeechRecognitionPreferences() { 138 ShellBrowserContext::GetSpeechRecognitionPreferences() {
138 return NULL; 139 return NULL;
139 } 140 }
140 141
141 bool ShellBrowserContext::DidLastSessionExitCleanly() { 142 bool ShellBrowserContext::DidLastSessionExitCleanly() {
142 return true; 143 return true;
143 } 144 }
144 145
145 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { 146 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() {
146 return NULL; 147 return NULL;
147 } 148 }
148 149
149 } // namespace content 150 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698