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

Side by Side Diff: chromecast/base/cast_sys_info_android.cc

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « chromecast/base/bind_to_task_runner_unittest.cc ('k') | chromecast/base/cast_sys_info_util.h » ('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 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 "chromecast/base/cast_sys_info_android.h" 5 #include "chromecast/base/cast_sys_info_android.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
11 #include "base/sys_info.h" 12 #include "base/sys_info.h"
12 #include "chromecast/base/cast_sys_info_util.h" 13 #include "chromecast/base/cast_sys_info_util.h"
13 #include "chromecast/base/version.h" 14 #include "chromecast/base/version.h"
14 #include "jni/CastSysInfoAndroid_jni.h" 15 #include "jni/CastSysInfoAndroid_jni.h"
15 16
16 namespace chromecast { 17 namespace chromecast {
17 18
18 namespace { 19 namespace {
19 const char kBuildTypeUser[] = "user"; 20 const char kBuildTypeUser[] = "user";
20 } // namespace 21 } // namespace
21 22
22 // static 23 // static
23 bool CastSysInfoAndroid::RegisterJni(JNIEnv* env) { 24 bool CastSysInfoAndroid::RegisterJni(JNIEnv* env) {
24 return RegisterNativesImpl(env); 25 return RegisterNativesImpl(env);
25 } 26 }
26 27
27 // static 28 // static
28 scoped_ptr<CastSysInfo> CreateSysInfo() { 29 std::unique_ptr<CastSysInfo> CreateSysInfo() {
29 return make_scoped_ptr(new CastSysInfoAndroid()); 30 return base::WrapUnique(new CastSysInfoAndroid());
30 } 31 }
31 32
32 CastSysInfoAndroid::CastSysInfoAndroid() 33 CastSysInfoAndroid::CastSysInfoAndroid()
33 : build_info_(base::android::BuildInfo::GetInstance()) { 34 : build_info_(base::android::BuildInfo::GetInstance()) {
34 } 35 }
35 36
36 CastSysInfoAndroid::~CastSysInfoAndroid() { 37 CastSysInfoAndroid::~CastSysInfoAndroid() {
37 } 38 }
38 39
39 CastSysInfo::BuildType CastSysInfoAndroid::GetBuildType() { 40 CastSysInfo::BuildType CastSysInfoAndroid::GetBuildType() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 NOTREACHED() << "GL information shouldn't be requested on Android."; 119 NOTREACHED() << "GL information shouldn't be requested on Android.";
119 return ""; 120 return "";
120 } 121 }
121 122
122 std::string CastSysInfoAndroid::GetGlVersion() { 123 std::string CastSysInfoAndroid::GetGlVersion() {
123 NOTREACHED() << "GL information shouldn't be requested on Android."; 124 NOTREACHED() << "GL information shouldn't be requested on Android.";
124 return ""; 125 return "";
125 } 126 }
126 127
127 } // namespace chromecast 128 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/base/bind_to_task_runner_unittest.cc ('k') | chromecast/base/cast_sys_info_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698