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

Side by Side Diff: sync/util/session_utils_android.cc

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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 | « sync/util/session_utils_android.h ('k') | sync/util/test_unrecoverable_error_handler.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 <jni.h> 5 #include <jni.h>
6 #include <sys/system_properties.h> 6 #include <sys/system_properties.h>
7 7
8 #include "sync/util/session_utils_android.h" 8 #include "sync/util/session_utils_android.h"
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 jmethodID j_get_content_resolver_method = GetMethodID( 44 jmethodID j_get_content_resolver_method = GetMethodID(
45 env, clazz,"getContentResolver", "()Landroid/content/ContentResolver;"); 45 env, clazz,"getContentResolver", "()Landroid/content/ContentResolver;");
46 jobject content_resolver = env->CallObjectMethod( 46 jobject content_resolver = env->CallObjectMethod(
47 GetApplicationContext(), j_get_content_resolver_method); 47 GetApplicationContext(), j_get_content_resolver_method);
48 CheckException(env); 48 CheckException(env);
49 return ScopedJavaLocalRef<jobject>(env, content_resolver); 49 return ScopedJavaLocalRef<jobject>(env, content_resolver);
50 } 50 }
51 51
52 } 52 }
53 53
54 namespace csync { 54 namespace syncer {
55 namespace internal { 55 namespace internal {
56 56
57 std::string GetAndroidId() { 57 std::string GetAndroidId() {
58 JNIEnv* env = AttachCurrentThread(); 58 JNIEnv* env = AttachCurrentThread();
59 ScopedJavaLocalRef<jstring> android_id = 59 ScopedJavaLocalRef<jstring> android_id =
60 GetAndroidIdJNI(env, GetContentResolver(env)); 60 GetAndroidIdJNI(env, GetContentResolver(env));
61 return ConvertJavaStringToUTF8(android_id); 61 return ConvertJavaStringToUTF8(android_id);
62 } 62 }
63 63
64 std::string GetModel() { 64 std::string GetModel() {
65 char model[PROP_VALUE_MAX]; 65 char model[PROP_VALUE_MAX];
66 __system_property_get("ro.product.model", model); 66 __system_property_get("ro.product.model", model);
67 return model; 67 return model;
68 } 68 }
69 69
70 bool IsTabletUi() { 70 bool IsTabletUi() {
71 NOTIMPLEMENTED() << "TODO(yfriedman): Upstream this"; 71 NOTIMPLEMENTED() << "TODO(yfriedman): Upstream this";
72 return true; 72 return true;
73 } 73 }
74 74
75 } // namespace internal 75 } // namespace internal
76 } // namespace csync 76 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/util/session_utils_android.h ('k') | sync/util/test_unrecoverable_error_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698