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

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

Issue 638803002: Reorganizes Chromecast code to better reflect functional dependencies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra DEPS: chromecast/crash/android --> chromecast/common 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chromecast/shell/browser/cast_browser_process.h"
6
7 #include "base/logging.h"
8 #include "chromecast/metrics/cast_metrics_service_client.h"
9 #include "chromecast/service/cast_service.h"
10 #include "chromecast/shell/browser/cast_browser_context.h"
11 #include "chromecast/shell/browser/devtools/remote_debugging_server.h"
12
13 #if defined(OS_ANDROID)
14 #include "components/crash/browser/crash_dump_manager_android.h"
15 #endif // defined(OS_ANDROID)
16
17 namespace chromecast {
18 namespace shell {
19
20 namespace {
21 CastBrowserProcess* g_instance = NULL;
22 } // namespace
23
24 // static
25 CastBrowserProcess* CastBrowserProcess::GetInstance() {
26 DCHECK(g_instance);
27 return g_instance;
28 }
29
30 CastBrowserProcess::CastBrowserProcess() {
31 DCHECK(!g_instance);
32 g_instance = this;
33 }
34
35 CastBrowserProcess::~CastBrowserProcess() {
36 DCHECK_EQ(g_instance, this);
37 g_instance = NULL;
38 }
39
40 void CastBrowserProcess::SetBrowserContext(
41 CastBrowserContext* browser_context) {
42 DCHECK(!browser_context_);
43 browser_context_.reset(browser_context);
44 }
45
46 void CastBrowserProcess::SetCastService(CastService* cast_service) {
47 DCHECK(!cast_service_);
48 cast_service_.reset(cast_service);
49 }
50
51 void CastBrowserProcess::SetRemoteDebuggingServer(
52 RemoteDebuggingServer* remote_debugging_server) {
53 DCHECK(!remote_debugging_server_);
54 remote_debugging_server_.reset(remote_debugging_server);
55 }
56
57 void CastBrowserProcess::SetMetricsServiceClient(
58 metrics::CastMetricsServiceClient* metrics_service_client) {
59 DCHECK(!metrics_service_client_);
60 metrics_service_client_.reset(metrics_service_client);
61 }
62
63 #if defined(OS_ANDROID)
64 void CastBrowserProcess::SetCrashDumpManager(
65 breakpad::CrashDumpManager* crash_dump_manager) {
66 DCHECK(!crash_dump_manager_);
67 crash_dump_manager_.reset(crash_dump_manager);
68 }
69 #endif // defined(OS_ANDROID)
70
71 } // namespace shell
72 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/shell/browser/cast_browser_process.h ('k') | chromecast/shell/browser/cast_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698