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: blimp/client/core/dummy_blimp_client_context.cc

Issue 2326913004: Adding UMA stats for Blimp Client (Closed)
Patch Set: dtrainor comments Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "blimp/client/core/dummy_blimp_client_context.h" 5 #include "blimp/client/core/dummy_blimp_client_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/metrics/histogram_macros.h"
9 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
10 #include "blimp/client/public/compositor/compositor_dependencies.h" 11 #include "blimp/client/public/compositor/compositor_dependencies.h"
11 12
12 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
13 #include "blimp/client/core/android/dummy_blimp_client_context_android.h" 14 #include "blimp/client/core/android/dummy_blimp_client_context_android.h"
14 #endif // OS_ANDROID 15 #endif // OS_ANDROID
15 16
16 namespace blimp { 17 namespace blimp {
17 namespace client { 18 namespace client {
18 19
19 // This function is declared in //blimp/client/public/blimp_client_context.h, 20 // This function is declared in //blimp/client/public/blimp_client_context.h,
20 // and either this function or the one in 21 // and either this function or the one in
21 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to 22 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to
22 // any binary using BlimpClientContext::Create. 23 // any binary using BlimpClientContext::Create.
23 // static 24 // static
24 BlimpClientContext* BlimpClientContext::Create( 25 BlimpClientContext* BlimpClientContext::Create(
25 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 26 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
26 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 27 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
27 std::unique_ptr<CompositorDependencies> compositor_dependencies) { 28 std::unique_ptr<CompositorDependencies> compositor_dependencies) {
28 #if defined(OS_ANDROID) 29 #if defined(OS_ANDROID)
29 return new DummyBlimpClientContextAndroid(); 30 return new DummyBlimpClientContextAndroid();
30 #else 31 #else
31 return new DummyBlimpClientContext(); 32 return new DummyBlimpClientContext();
32 #endif // defined(OS_ANDROID) 33 #endif // defined(OS_ANDROID)
33 } 34 }
34 35
35 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() {} 36 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() {
37 UMA_HISTOGRAM_BOOLEAN("Blimp.Supported", false);
38 }
36 39
37 DummyBlimpClientContext::~DummyBlimpClientContext() {} 40 DummyBlimpClientContext::~DummyBlimpClientContext() {}
38 41
39 void DummyBlimpClientContext::SetDelegate( 42 void DummyBlimpClientContext::SetDelegate(
40 BlimpClientContextDelegate* delegate) {} 43 BlimpClientContextDelegate* delegate) {}
41 44
42 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents( 45 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents(
43 gfx::NativeWindow window) { 46 gfx::NativeWindow window) {
44 return nullptr; 47 return nullptr;
45 } 48 }
46 49
47 void DummyBlimpClientContext::Connect() { 50 void DummyBlimpClientContext::Connect() {
48 NOTREACHED(); 51 NOTREACHED();
49 } 52 }
50 53
51 } // namespace client 54 } // namespace client
52 } // namespace blimp 55 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/contents/blimp_contents_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698