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

Side by Side Diff: chrome/browser/android/bookmarks/bookmarks_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/bookmarks/bookmarks_bridge.h" 5 #include "chrome/browser/android/bookmarks/bookmarks_bridge.h"
6 6
7 #include "base/android/jni_string.h" 7 #include "base/android/jni_string.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void BookmarksBridge::Destroy(JNIEnv*, jobject) { 69 void BookmarksBridge::Destroy(JNIEnv*, jobject) {
70 delete this; 70 delete this;
71 } 71 }
72 72
73 // static 73 // static
74 bool BookmarksBridge::RegisterBookmarksBridge(JNIEnv* env) { 74 bool BookmarksBridge::RegisterBookmarksBridge(JNIEnv* env) {
75 return RegisterNativesImpl(env); 75 return RegisterNativesImpl(env);
76 } 76 }
77 77
78 static jint Init(JNIEnv* env, jobject obj, jobject j_profile) { 78 static jlong Init(JNIEnv* env, jobject obj, jobject j_profile) {
79 BookmarksBridge* delegate = new BookmarksBridge(env, obj, j_profile); 79 BookmarksBridge* delegate = new BookmarksBridge(env, obj, j_profile);
80 return reinterpret_cast<jint>(delegate); 80 return reinterpret_cast<intptr_t>(delegate);
81 } 81 }
82 82
83 static bool IsEditBookmarksEnabled() { 83 static bool IsEditBookmarksEnabled() {
84 return ProfileManager::GetLastUsedProfile()->GetPrefs()->GetBoolean( 84 return ProfileManager::GetLastUsedProfile()->GetPrefs()->GetBoolean(
85 prefs::kEditBookmarksEnabled); 85 prefs::kEditBookmarksEnabled);
86 } 86 }
87 87
88 static jboolean IsEditBookmarksEnabled(JNIEnv* env, jclass clazz) { 88 static jboolean IsEditBookmarksEnabled(JNIEnv* env, jclass clazz) {
89 return IsEditBookmarksEnabled(); 89 return IsEditBookmarksEnabled();
90 } 90 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 BookmarkModelChanged(); 453 BookmarkModelChanged();
454 } 454 }
455 455
456 void BookmarksBridge::PartnerShimLoaded(PartnerBookmarksShim* shim) { 456 void BookmarksBridge::PartnerShimLoaded(PartnerBookmarksShim* shim) {
457 NotifyIfDoneLoading(); 457 NotifyIfDoneLoading();
458 } 458 }
459 459
460 void BookmarksBridge::ShimBeingDeleted(PartnerBookmarksShim* shim) { 460 void BookmarksBridge::ShimBeingDeleted(PartnerBookmarksShim* shim) {
461 partner_bookmarks_shim_ = NULL; 461 partner_bookmarks_shim_ = NULL;
462 } 462 }
OLDNEW
« no previous file with comments | « chrome/android/testshell/testshell_tab.cc ('k') | chrome/browser/android/chrome_web_contents_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698