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

Unified Diff: extensions/browser/api/sockets_tcp/sockets_tcp_api.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 | « extensions/browser/api/socket/socket_api.cc ('k') | extensions/browser/api_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc b/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
index be36153cbbc87f1e00f0066fe2b853c0227300e5..4acbf8892491247d38d2847af98016030c83b613 100644
--- a/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
+++ b/extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
@@ -5,6 +5,7 @@
#include "extensions/browser/api/sockets_tcp/sockets_tcp_api.h"
#include "content/public/browser/browser_context.h"
+#include "content/public/browser/storage_partition.h"
#include "content/public/common/socket_permission_request.h"
#include "extensions/browser/api/socket/tcp_socket.h"
#include "extensions/browser/api/socket/tls_socket.h"
@@ -455,7 +456,8 @@ bool SocketsTcpSecureFunction::Prepare() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
params_ = api::sockets_tcp::Secure::Params::Create(*args_);
EXTENSION_FUNCTION_VALIDATE(params_.get());
- url_request_getter_ = browser_context()->GetRequestContext();
+ url_request_getter_ = content::BrowserContext::GetDefaultStoragePartition(
+ browser_context())->GetURLRequestContext();
return true;
}
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | extensions/browser/api_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698