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

Side by Side Diff: chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 years, 4 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 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 "chrome/browser/android/browsing_data/browsing_data_counter_bridge.h" 5 #include "chrome/browser/android/browsing_data/browsing_data_counter_bridge.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "chrome/browser/browsing_data/browsing_data_counter_factory.h" 8 #include "chrome/browser/browsing_data/browsing_data_counter_factory.h"
9 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h" 9 #include "chrome/browser/browsing_data/browsing_data_counter_utils.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 bool BrowsingDataCounterBridge::Register(JNIEnv* env) { 53 bool BrowsingDataCounterBridge::Register(JNIEnv* env) {
54 return RegisterNativesImpl(env); 54 return RegisterNativesImpl(env);
55 } 55 }
56 56
57 void BrowsingDataCounterBridge::onCounterFinished( 57 void BrowsingDataCounterBridge::onCounterFinished(
58 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) { 58 std::unique_ptr<browsing_data::BrowsingDataCounter::Result> result) {
59 JNIEnv* env = base::android::AttachCurrentThread(); 59 JNIEnv* env = base::android::AttachCurrentThread();
60 ScopedJavaLocalRef<jstring> result_string = 60 ScopedJavaLocalRef<jstring> result_string =
61 base::android::ConvertUTF16ToJavaString( 61 base::android::ConvertUTF16ToJavaString(
62 env, GetChromeCounterTextFromResult(result.get())); 62 env, GetChromeCounterTextFromResult(result.get()));
63 Java_BrowsingDataCounterBridge_onBrowsingDataCounterFinished( 63 Java_BrowsingDataCounterBridge_onBrowsingDataCounterFinished(env, jobject_,
64 env, jobject_.obj(), result_string.obj()); 64 result_string);
65 } 65 }
66 66
67 static jlong Init( 67 static jlong Init(
68 JNIEnv* env, const JavaParamRef<jobject>& obj, int data_type) { 68 JNIEnv* env, const JavaParamRef<jobject>& obj, int data_type) {
69 return reinterpret_cast<intptr_t>( 69 return reinterpret_cast<intptr_t>(
70 new BrowsingDataCounterBridge(env, obj, data_type)); 70 new BrowsingDataCounterBridge(env, obj, data_type));
71 } 71 }
OLDNEW
« no previous file with comments | « chrome/browser/android/bottombar/overlay_panel_content.cc ('k') | chrome/browser/android/chrome_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698