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

Side by Side Diff: content/common/android/device_telephony_info.cc

Issue 11886074: Use correct favicon scale factor on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split DeviceTelephonyInfo from DeviceDisplayInfo; added SCALE_FACTOR_150P and 300P. Created 7 years, 11 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/common/android/device_telephony_info.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/logging.h"
10 #include "jni/DeviceTelephonyInfo_jni.h"
11
12 using base::android::AttachCurrentThread;
13 using base::android::ConvertJavaStringToUTF8;
14 using base::android::ScopedJavaLocalRef;
15
16 namespace content {
17
18 DeviceTelephonyInfo::DeviceTelephonyInfo() {
19 JNIEnv* env = AttachCurrentThread();
20 j_device_info_.Reset(Java_DeviceTelephonyInfo_create(env,
21 base::android::GetApplicationContext()));
22 }
23
24 DeviceTelephonyInfo::~DeviceTelephonyInfo() {
25 }
26
27 std::string DeviceTelephonyInfo::GetNetworkCountryIso() {
28 JNIEnv* env = AttachCurrentThread();
29 ScopedJavaLocalRef<jstring> result =
30 Java_DeviceTelephonyInfo_getNetworkCountryIso(env, j_device_info_.obj());
31 return ConvertJavaStringToUTF8(result);
32 }
33
34 // static
35 bool DeviceTelephonyInfo::RegisterDeviceTelephonyInfo(JNIEnv* env) {
36 return RegisterNativesImpl(env);
37 }
38
39 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698