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

Unified Diff: android_webview/browser/aw_browser_context.cc

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/net/token_binding_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_context.cc
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index d5252bd244746c99d3ee9727fb838b0b5664a800..3cd1128525fcd8513f4d0e7ee95ae2865ca447fc 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -259,9 +259,11 @@ void AwBrowserContext::PreMainMessageLoopRun() {
const FilePath guid_file_path =
GetPath().Append(FILE_PATH_LITERAL("metrics_guid"));
- AwMetricsServiceClient::GetInstance()->Initialize(user_pref_service_.get(),
- GetRequestContext(),
- guid_file_path);
+ AwMetricsServiceClient::GetInstance()->Initialize(
+ user_pref_service_.get(),
+ content::BrowserContext::GetDefaultStoragePartition(this)->
+ GetURLRequestContext(),
+ guid_file_path);
}
void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) {
@@ -348,18 +350,16 @@ bool AwBrowserContext::IsOffTheRecord() const {
return false;
}
-net::URLRequestContextGetter* AwBrowserContext::GetRequestContext() {
- return GetDefaultStoragePartition(this)->GetURLRequestContext();
-}
-
net::URLRequestContextGetter* AwBrowserContext::GetMediaRequestContext() {
- return GetRequestContext();
+ return content::BrowserContext::GetDefaultStoragePartition(this)->
+ GetURLRequestContext();
}
net::URLRequestContextGetter*
AwBrowserContext::GetMediaRequestContextForRenderProcess(
int renderer_child_id) {
- return GetRequestContext();
+ return content::BrowserContext::GetDefaultStoragePartition(this)->
+ GetURLRequestContext();
}
net::URLRequestContextGetter*
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/net/token_binding_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698