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

Side by Side Diff: chrome/browser/android/bookmarks/bookmarks_bridge.cc

Issue 552743002: [Android] Make BookmarkModelObserver more convenient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: variable renaming Created 6 years, 3 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
« no previous file with comments | « chrome/browser/android/bookmarks/bookmarks_bridge.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/containers/stack_container.h" 8 #include "base/containers/stack_container.h"
9 #include "base/i18n/string_compare.h" 9 #include "base/i18n/string_compare.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 ScopedJavaLocalRef<jobject> BookmarksBridge::GetBookmarkByID(JNIEnv* env, 149 ScopedJavaLocalRef<jobject> BookmarksBridge::GetBookmarkByID(JNIEnv* env,
150 jobject obj, 150 jobject obj,
151 jlong id, 151 jlong id,
152 jint type) { 152 jint type) {
153 DCHECK(IsLoaded()); 153 DCHECK(IsLoaded());
154 return CreateJavaBookmark(GetNodeByID(id, type)); 154 return CreateJavaBookmark(GetNodeByID(id, type));
155 } 155 }
156 156
157 bool BookmarksBridge::IsDoingExtensiveChanges(JNIEnv* env, jobject obj) {
158 return bookmark_model_->IsDoingExtensiveChanges();
159 }
160
157 void BookmarksBridge::GetPermanentNodeIDs(JNIEnv* env, 161 void BookmarksBridge::GetPermanentNodeIDs(JNIEnv* env,
158 jobject obj, 162 jobject obj,
159 jobject j_result_obj) { 163 jobject j_result_obj) {
160 // TODO(kkimlabs): Remove this function. 164 // TODO(kkimlabs): Remove this function.
161 DCHECK(IsLoaded()); 165 DCHECK(IsLoaded());
162 166
163 base::StackVector<const BookmarkNode*, 8> permanent_nodes; 167 base::StackVector<const BookmarkNode*, 8> permanent_nodes;
164 168
165 // Save all the permanent nodes. 169 // Save all the permanent nodes.
166 const BookmarkNode* root_node = bookmark_model_->root_node(); 170 const BookmarkNode* root_node = bookmark_model_->root_node();
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 BookmarkModelChanged(); 871 BookmarkModelChanged();
868 } 872 }
869 873
870 void BookmarksBridge::PartnerShimLoaded(PartnerBookmarksShim* shim) { 874 void BookmarksBridge::PartnerShimLoaded(PartnerBookmarksShim* shim) {
871 NotifyIfDoneLoading(); 875 NotifyIfDoneLoading();
872 } 876 }
873 877
874 void BookmarksBridge::ShimBeingDeleted(PartnerBookmarksShim* shim) { 878 void BookmarksBridge::ShimBeingDeleted(PartnerBookmarksShim* shim) {
875 partner_bookmarks_shim_ = NULL; 879 partner_bookmarks_shim_ = NULL;
876 } 880 }
OLDNEW
« no previous file with comments | « chrome/browser/android/bookmarks/bookmarks_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698