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

Side by Side Diff: components/arc/arc_bridge_service.cc

Issue 2571763003: Reduce FakeArcBridgeService usage. (Closed)
Patch Set: Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/arc/arc_bridge_service.h" 5 #include "components/arc/arc_bridge_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 25 matching lines...) Expand all
36 return command_line->HasSwitch(chromeos::switches::kEnableArc) || 36 return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
37 (command_line->HasSwitch(chromeos::switches::kArcAvailable) && 37 (command_line->HasSwitch(chromeos::switches::kArcAvailable) &&
38 base::FeatureList::IsEnabled(kArcEnabledFeature)); 38 base::FeatureList::IsEnabled(kArcEnabledFeature));
39 } 39 }
40 40
41 // static 41 // static
42 bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) { 42 bool ArcBridgeService::GetAvailable(const base::CommandLine* command_line) {
43 return command_line->HasSwitch(chromeos::switches::kArcAvailable); 43 return command_line->HasSwitch(chromeos::switches::kArcAvailable);
44 } 44 }
45 45
46 void ArcBridgeService::RequestStart() {
47 NOTREACHED();
48 }
49
50 void ArcBridgeService::RequestStop() {
51 NOTREACHED();
52 }
53
54 void ArcBridgeService::OnShutdown() {
55 NOTREACHED();
56 }
57
46 void ArcBridgeService::AddObserver(Observer* observer) { 58 void ArcBridgeService::AddObserver(Observer* observer) {
47 DCHECK(CalledOnValidThread()); 59 DCHECK(CalledOnValidThread());
48 observer_list_.AddObserver(observer); 60 observer_list_.AddObserver(observer);
49 } 61 }
50 62
51 void ArcBridgeService::RemoveObserver(Observer* observer) { 63 void ArcBridgeService::RemoveObserver(Observer* observer) {
52 DCHECK(CalledOnValidThread()); 64 DCHECK(CalledOnValidThread());
53 observer_list_.RemoveObserver(observer); 65 observer_list_.RemoveObserver(observer);
54 } 66 }
55 67
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CASE_IMPL(LOW_DISK_SPACE); 100 CASE_IMPL(LOW_DISK_SPACE);
89 CASE_IMPL(CRASH); 101 CASE_IMPL(CRASH);
90 #undef CASE_IMPL 102 #undef CASE_IMPL
91 } 103 }
92 104
93 // In case of unexpected value, output the int value. 105 // In case of unexpected value, output the int value.
94 return os << "StopReason(" << static_cast<int>(reason) << ")"; 106 return os << "StopReason(" << static_cast<int>(reason) << ")";
95 } 107 }
96 108
97 } // namespace arc 109 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698