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

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

Issue 960693002: Remove NetworkChangeNotifierCast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | chromecast/chromecast.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_main_parts.h" 5 #include "chromecast/browser/cast_browser_main_parts.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <sys/prctl.h> 8 #include <sys/prctl.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 11 matching lines...) Expand all
22 #include "chromecast/browser/media/cast_browser_cdm_factory.h" 22 #include "chromecast/browser/media/cast_browser_cdm_factory.h"
23 #include "chromecast/browser/metrics/cast_metrics_prefs.h" 23 #include "chromecast/browser/metrics/cast_metrics_prefs.h"
24 #include "chromecast/browser/metrics/cast_metrics_service_client.h" 24 #include "chromecast/browser/metrics/cast_metrics_service_client.h"
25 #include "chromecast/browser/pref_service_helper.h" 25 #include "chromecast/browser/pref_service_helper.h"
26 #include "chromecast/browser/service/cast_service.h" 26 #include "chromecast/browser/service/cast_service.h"
27 #include "chromecast/browser/url_request_context_factory.h" 27 #include "chromecast/browser/url_request_context_factory.h"
28 #include "chromecast/common/cast_paths.h" 28 #include "chromecast/common/cast_paths.h"
29 #include "chromecast/common/chromecast_switches.h" 29 #include "chromecast/common/chromecast_switches.h"
30 #include "chromecast/common/platform_client_auth.h" 30 #include "chromecast/common/platform_client_auth.h"
31 #include "chromecast/net/connectivity_checker.h" 31 #include "chromecast/net/connectivity_checker.h"
32 #include "chromecast/net/network_change_notifier_cast.h"
33 #include "chromecast/net/network_change_notifier_factory_cast.h"
34 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
35 #include "content/public/common/content_switches.h" 33 #include "content/public/common/content_switches.h"
36 #include "media/base/browser_cdm_factory.h" 34 #include "media/base/browser_cdm_factory.h"
37 #include "media/base/media_switches.h" 35 #include "media/base/media_switches.h"
38 36
39 #if defined(OS_ANDROID) 37 #if defined(OS_ANDROID)
40 #include "chromecast/crash/android/crash_handler.h" 38 #include "chromecast/crash/android/crash_handler.h"
41 #include "components/crash/browser/crash_dump_manager_android.h" 39 #include "components/crash/browser/crash_dump_manager_android.h"
42 #include "net/android/network_change_notifier_factory_android.h" 40 #include "net/android/network_change_notifier_factory_android.h"
43 #endif 41 #endif
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // GroupedHistograms needs to be initialized before any threads are created 158 // GroupedHistograms needs to be initialized before any threads are created
161 // to prevent race conditions between calls to Preregister and those threads 159 // to prevent race conditions between calls to Preregister and those threads
162 // attempting to collect metrics. 160 // attempting to collect metrics.
163 // This call must also be before NetworkChangeNotifier, as it generates 161 // This call must also be before NetworkChangeNotifier, as it generates
164 // Net/DNS metrics. 162 // Net/DNS metrics.
165 metrics::PreregisterAllGroupedHistograms(); 163 metrics::PreregisterAllGroupedHistograms();
166 164
167 #if defined(OS_ANDROID) 165 #if defined(OS_ANDROID)
168 net::NetworkChangeNotifier::SetFactory( 166 net::NetworkChangeNotifier::SetFactory(
169 new net::NetworkChangeNotifierFactoryAndroid()); 167 new net::NetworkChangeNotifierFactoryAndroid());
170 #else
171 net::NetworkChangeNotifier::SetFactory(
172 new NetworkChangeNotifierFactoryCast());
173 #endif // defined(OS_ANDROID) 168 #endif // defined(OS_ANDROID)
174 } 169 }
175 170
176 void CastBrowserMainParts::PostMainMessageLoopStart() { 171 void CastBrowserMainParts::PostMainMessageLoopStart() {
177 cast_browser_process_->SetMetricsHelper(make_scoped_ptr( 172 cast_browser_process_->SetMetricsHelper(make_scoped_ptr(
178 new metrics::CastMetricsHelper(base::MessageLoopProxy::current()))); 173 new metrics::CastMetricsHelper(base::MessageLoopProxy::current())));
179 174
180 #if defined(OS_ANDROID) 175 #if defined(OS_ANDROID)
181 base::MessageLoopForUI::current()->Start(); 176 base::MessageLoopForUI::current()->Start();
182 #endif // defined(OS_ANDROID) 177 #endif // defined(OS_ANDROID)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 NOTREACHED(); 276 NOTREACHED();
282 #else 277 #else
283 cast_browser_process_->cast_service()->Finalize(); 278 cast_browser_process_->cast_service()->Finalize();
284 cast_browser_process_->metrics_service_client()->Finalize(); 279 cast_browser_process_->metrics_service_client()->Finalize();
285 cast_browser_process_.reset(); 280 cast_browser_process_.reset();
286 #endif 281 #endif
287 } 282 }
288 283
289 } // namespace shell 284 } // namespace shell
290 } // namespace chromecast 285 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698