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

Side by Side Diff: blimp/engine/common/blimp_browser_context.cc

Issue 1878153002: Revert of Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/engine/common/blimp_browser_context.h" 5 #include "blimp/engine/common/blimp_browser_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/nix/xdg_util.h" 10 #include "base/nix/xdg_util.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 net::URLRequestContextGetter* 100 net::URLRequestContextGetter*
101 BlimpBrowserContext::GetSystemRequestContextGetter() { 101 BlimpBrowserContext::GetSystemRequestContextGetter() {
102 if (!system_context_getter_) { 102 if (!system_context_getter_) {
103 system_context_getter_ = new BlimpSystemURLRequestContextGetter(); 103 system_context_getter_ = new BlimpSystemURLRequestContextGetter();
104 } 104 }
105 return system_context_getter_.get(); 105 return system_context_getter_.get();
106 } 106 }
107 107
108 net::URLRequestContextGetter* BlimpBrowserContext::GetRequestContext() {
109 return GetDefaultStoragePartition(this)->GetURLRequestContext();
110 }
111
108 net::URLRequestContextGetter* BlimpBrowserContext::GetMediaRequestContext() { 112 net::URLRequestContextGetter* BlimpBrowserContext::GetMediaRequestContext() {
109 return resource_context_->url_request_context_getter().get(); 113 return GetRequestContext();
110 } 114 }
111 115
112 net::URLRequestContextGetter* 116 net::URLRequestContextGetter*
113 BlimpBrowserContext::GetMediaRequestContextForRenderProcess( 117 BlimpBrowserContext::GetMediaRequestContextForRenderProcess(
114 int renderer_child_id) { 118 int renderer_child_id) {
115 return resource_context_->url_request_context_getter().get(); 119 return GetRequestContext();
116 } 120 }
117 121
118 net::URLRequestContextGetter* 122 net::URLRequestContextGetter*
119 BlimpBrowserContext::GetMediaRequestContextForStoragePartition( 123 BlimpBrowserContext::GetMediaRequestContextForStoragePartition(
120 const base::FilePath& partition_path, 124 const base::FilePath& partition_path,
121 bool in_memory) { 125 bool in_memory) {
122 return resource_context_->url_request_context_getter().get(); 126 return GetRequestContext();
123 } 127 }
124 128
125 content::ResourceContext* BlimpBrowserContext::GetResourceContext() { 129 content::ResourceContext* BlimpBrowserContext::GetResourceContext() {
126 return resource_context_.get(); 130 return resource_context_.get();
127 } 131 }
128 132
129 content::BrowserPluginGuestManager* BlimpBrowserContext::GetGuestManager() { 133 content::BrowserPluginGuestManager* BlimpBrowserContext::GetGuestManager() {
130 return nullptr; 134 return nullptr;
131 } 135 }
132 136
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 BlimpBrowserContext::CreateRequestContextForStoragePartition( 177 BlimpBrowserContext::CreateRequestContextForStoragePartition(
174 const base::FilePath& partition_path, 178 const base::FilePath& partition_path,
175 bool in_memory, 179 bool in_memory,
176 content::ProtocolHandlerMap* protocol_handlers, 180 content::ProtocolHandlerMap* protocol_handlers,
177 content::URLRequestInterceptorScopedVector request_interceptors) { 181 content::URLRequestInterceptorScopedVector request_interceptors) {
178 return nullptr; 182 return nullptr;
179 } 183 }
180 184
181 } // namespace engine 185 } // namespace engine
182 } // namespace blimp 186 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/common/blimp_browser_context.h ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698