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

Side by Side Diff: chrome/browser/chromeos/device/input_service_proxy_factory.cc

Issue 913773002: Created fakes for HID-detection screen testing. Initial browsertest added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
(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 "chrome/browser/chromeos/device/input_service_proxy_factory.h"
6
7 #include "chrome/browser/chromeos/device/fake_input_service_proxy.h"
8
9 namespace chromeos {
10
11 // static
12 InputServiceProxy* InputServiceProxyFactory::GetProxy() {
13 if (in_fake_mode_)
14 return static_cast<InputServiceProxy*>(new FakeInputServiceProxy);
Nikita (slow) 2015/02/11 14:53:07 drop static_cast<>
merkulova 2015/02/13 10:00:04 Done.
15 return new InputServiceProxy();
16 }
17
18 // static
19 bool InputServiceProxyFactory::in_fake_mode_ = false;
Nikita (slow) 2015/02/11 14:53:07 nit: use_fake_instance_
merkulova 2015/02/13 10:00:04 Done.
20
21 // static
22 void InputServiceProxyFactory::SetFakeForTesting(bool to_fake) {
Nikita (slow) 2015/02/11 14:53:07 nit: bool use_fake_instance
merkulova 2015/02/13 10:00:04 Done.
23 in_fake_mode_ = to_fake;
24 }
25
26 // static
27 bool InputServiceProxyFactory::IsFakeSetForTesting() {
28 return in_fake_mode_;
29 }
30
31 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698