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

Unified Diff: content/shell/browser/shell_browser_context.cc

Issue 631203003: Fix bug: AppShell: CHECK failure in PeerConnection init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/browser/shell_browser_context.cc
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc
index 7a99e8d7888cb12cf589bd03c3da5ceec59263de..308ed388359e2697edf9b03e72eae275134da926 100644
--- a/content/shell/browser/shell_browser_context.cc
+++ b/content/shell/browser/shell_browser_context.cc
@@ -12,11 +12,9 @@
#include "base/path_service.h"
#include "base/threading/thread.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/resource_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "content/shell/browser/shell_download_manager_delegate.h"
-#include "content/shell/browser/shell_url_request_context_getter.h"
#include "content/shell/common/shell_switches.h"
#if defined(OS_WIN)
@@ -29,38 +27,32 @@
namespace content {
-class ShellBrowserContext::ShellResourceContext : public ResourceContext {
- public:
- ShellResourceContext() : getter_(NULL) {}
- virtual ~ShellResourceContext() {}
-
- // ResourceContext implementation:
- virtual net::HostResolver* GetHostResolver() override {
- CHECK(getter_);
- return getter_->host_resolver();
- }
- virtual net::URLRequestContext* GetRequestContext() override {
- CHECK(getter_);
- return getter_->GetURLRequestContext();
- }
+ShellBrowserContext::ShellResourceContext::ShellResourceContext()
+ : getter_(NULL) {
+}
- void set_url_request_context_getter(ShellURLRequestContextGetter* getter) {
- getter_ = getter;
- }
+ShellBrowserContext::ShellResourceContext::~ShellResourceContext() {
+}
- private:
- ShellURLRequestContextGetter* getter_;
+net::HostResolver*
+ShellBrowserContext::ShellResourceContext::GetHostResolver() {
+ CHECK(getter_);
+ return getter_->host_resolver();
+}
- DISALLOW_COPY_AND_ASSIGN(ShellResourceContext);
-};
+net::URLRequestContext*
+ShellBrowserContext::ShellResourceContext::GetRequestContext() {
+ CHECK(getter_);
+ return getter_->GetURLRequestContext();
+}
ShellBrowserContext::ShellBrowserContext(bool off_the_record,
net::NetLog* net_log)
- : off_the_record_(off_the_record),
+ : resource_context_(new ShellResourceContext),
+ off_the_record_(off_the_record),
net_log_(net_log),
ignore_certificate_errors_(false),
- guest_manager_(NULL),
- resource_context_(new ShellResourceContext) {
+ guest_manager_(NULL) {
InitWhileIOAllowed();
}
« no previous file with comments | « content/shell/browser/shell_browser_context.h ('k') | content/shell/browser/shell_url_request_context_getter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698