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

Side by Side Diff: chrome/browser/android/recently_closed_tabs_bridge.cc

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/recently_closed_tabs_bridge.h" 5 #include "chrome/browser/android/recently_closed_tabs_bridge.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "chrome/browser/android/tab_android.h" 8 #include "chrome/browser/android/tab_android.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_android.h" 10 #include "chrome/browser/profiles/profile_android.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // TabRestoreServiceFactory::GetForProfile() can return NULL (e.g. in 146 // TabRestoreServiceFactory::GetForProfile() can return NULL (e.g. in
147 // incognito mode). 147 // incognito mode).
148 if (tab_restore_service_) { 148 if (tab_restore_service_) {
149 // This does nothing if the tabs have already been loaded or they 149 // This does nothing if the tabs have already been loaded or they
150 // shouldn't be loaded. 150 // shouldn't be loaded.
151 tab_restore_service_->LoadTabsFromLastSession(); 151 tab_restore_service_->LoadTabsFromLastSession();
152 tab_restore_service_->AddObserver(this); 152 tab_restore_service_->AddObserver(this);
153 } 153 }
154 } 154 }
155 155
156 static jint Init(JNIEnv* env, jobject obj, jobject jprofile) { 156 static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) {
157 RecentlyClosedTabsBridge* bridge = new RecentlyClosedTabsBridge( 157 RecentlyClosedTabsBridge* bridge = new RecentlyClosedTabsBridge(
158 ProfileAndroid::FromProfileAndroid(jprofile)); 158 ProfileAndroid::FromProfileAndroid(jprofile));
159 return reinterpret_cast<jint>(bridge); 159 return reinterpret_cast<intptr_t>(bridge);
160 } 160 }
161 161
162 // static 162 // static
163 bool RecentlyClosedTabsBridge::Register(JNIEnv* env) { 163 bool RecentlyClosedTabsBridge::Register(JNIEnv* env) {
164 return RegisterNativesImpl(env); 164 return RegisterNativesImpl(env);
165 } 165 }
OLDNEW
« no previous file with comments | « chrome/browser/android/provider/chrome_browser_provider.cc ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698