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

Side by Side Diff: chromecast/browser/cast_browser_process.cc

Issue 2647323010: [Chromecast] Add proxy server support to chromecast (Closed)
Patch Set: fix deps Created 3 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_browser_process.h" 5 #include "chromecast/browser/cast_browser_process.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chromecast/base/metrics/cast_metrics_helper.h" 11 #include "chromecast/base/metrics/cast_metrics_helper.h"
12 #include "chromecast/browser/cast_browser_context.h" 12 #include "chromecast/browser/cast_browser_context.h"
13 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" 13 #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h"
14 #include "chromecast/browser/devtools/remote_debugging_server.h" 14 #include "chromecast/browser/devtools/remote_debugging_server.h"
15 #include "chromecast/browser/metrics/cast_metrics_service_client.h" 15 #include "chromecast/browser/metrics/cast_metrics_service_client.h"
16 #include "chromecast/net/connectivity_checker.h" 16 #include "chromecast/net/connectivity_checker.h"
17 #include "chromecast/service/cast_service.h" 17 #include "chromecast/service/cast_service.h"
18 #include "components/prefs/pref_service.h" 18 #include "components/prefs/pref_service.h"
19 #include "components/proxy_config/pref_proxy_config_tracker_impl.h"
20 #include "content/public/browser/browser_thread.h"
21 #include "net/proxy/proxy_service.h"
halliwell 2017/02/08 00:07:06 unused? think you can revert this whole file now?
almasrymina 2017/02/08 00:48:04 Done.
19 22
20 #if defined(OS_ANDROID) 23 #if defined(OS_ANDROID)
21 #include "components/crash/content/browser/crash_dump_manager_android.h" 24 #include "components/crash/content/browser/crash_dump_manager_android.h"
22 #endif // defined(OS_ANDROID) 25 #endif // defined(OS_ANDROID)
23 26
24 #if defined(USE_AURA) 27 #if defined(USE_AURA)
25 #include "chromecast/graphics/cast_screen.h" 28 #include "chromecast/graphics/cast_screen.h"
26 #endif // defined(USE_AURA) 29 #endif // defined(USE_AURA)
27 30
28 namespace chromecast { 31 namespace chromecast {
(...skipping 11 matching lines...) Expand all
40 43
41 CastBrowserProcess::CastBrowserProcess() 44 CastBrowserProcess::CastBrowserProcess()
42 : cast_content_browser_client_(nullptr), 45 : cast_content_browser_client_(nullptr),
43 net_log_(nullptr) { 46 net_log_(nullptr) {
44 DCHECK(!g_instance); 47 DCHECK(!g_instance);
45 g_instance = this; 48 g_instance = this;
46 } 49 }
47 50
48 CastBrowserProcess::~CastBrowserProcess() { 51 CastBrowserProcess::~CastBrowserProcess() {
49 DCHECK_EQ(g_instance, this); 52 DCHECK_EQ(g_instance, this);
53
50 if (pref_service_) 54 if (pref_service_)
51 pref_service_->CommitPendingWrite(); 55 pref_service_->CommitPendingWrite();
52 g_instance = NULL; 56 g_instance = NULL;
53 } 57 }
54 58
55 void CastBrowserProcess::SetBrowserContext( 59 void CastBrowserProcess::SetBrowserContext(
56 std::unique_ptr<CastBrowserContext> browser_context) { 60 std::unique_ptr<CastBrowserContext> browser_context) {
57 DCHECK(!browser_context_); 61 DCHECK(!browser_context_);
58 browser_context_.swap(browser_context); 62 browser_context_.swap(browser_context);
59 } 63 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 connectivity_checker_.swap(connectivity_checker); 126 connectivity_checker_.swap(connectivity_checker);
123 } 127 }
124 128
125 void CastBrowserProcess::SetNetLog(net::NetLog* net_log) { 129 void CastBrowserProcess::SetNetLog(net::NetLog* net_log) {
126 DCHECK(!net_log_); 130 DCHECK(!net_log_);
127 net_log_ = net_log; 131 net_log_ = net_log;
128 } 132 }
129 133
130 } // namespace shell 134 } // namespace shell
131 } // namespace chromecast 135 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698