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

Side by Side Diff: base/android/build_info.cc

Issue 10753007: Switch base/ registrations to a static class method where appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/android/build_info.h ('k') | base/message_pump_android.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/android/build_info.h" 5 #include "base/android/build_info.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // static 57 // static
58 BuildInfo* BuildInfo::GetInstance() { 58 BuildInfo* BuildInfo::GetInstance() {
59 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get(); 59 return Singleton<BuildInfo, BuildInfoSingletonTraits >::get();
60 } 60 }
61 61
62 void BuildInfo::set_java_exception_info(const std::string& info) { 62 void BuildInfo::set_java_exception_info(const std::string& info) {
63 DCHECK(!java_exception_info_) << "info should be set only once."; 63 DCHECK(!java_exception_info_) << "info should be set only once.";
64 java_exception_info_ = strndup(info.c_str(), 1024); 64 java_exception_info_ = strndup(info.c_str(), 1024);
65 } 65 }
66 66
67 bool RegisterBuildInfo(JNIEnv* env) { 67 // static
68 bool BuildInfo::RegisterBindings(JNIEnv* env) {
68 return RegisterNativesImpl(env); 69 return RegisterNativesImpl(env);
69 } 70 }
70 71
71 } // namespace android 72 } // namespace android
72 } // namespace base 73 } // namespace base
OLDNEW
« no previous file with comments | « base/android/build_info.h ('k') | base/message_pump_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698