summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks
diff options
context:
space:
mode:
authorcsharp <csharp@chromium.org>2014-10-30 11:48:52 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-30 18:49:11 +0000
commit8077169fda2b11a06ec08983c98d1e133d6c9c79 (patch)
tree5eca9bc00a1db7219f51e90a30b701f4c4ebc466 /components/enhanced_bookmarks
parente48477cd0a73dce8d17a2a6290434602252d6ba6 (diff)
downloadchromium_src-8077169fda2b11a06ec08983c98d1e133d6c9c79.zip
chromium_src-8077169fda2b11a06ec08983c98d1e133d6c9c79.tar.gz
chromium_src-8077169fda2b11a06ec08983c98d1e133d6c9c79.tar.bz2
Revert of Reduce frequency of requesting bookmark clusters. (patchset #8 id:140001 of https://codereview.chromium.org/682933002/)
Reason for revert: This appears to have broken Chromium Linux on Android Arm64 Builder (dbg). FAILED: /mnt/data/b/build/goma/gomacc /mnt/data/b/build/slave/Android_Arm64_Builder__dbg_/build/src/third_party/android_tools/ndk//toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++ -MMD -MF obj/chrome/browser/android/enhanced_bookmarks/browser.enhanced_bookmarks_bridge.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_BROWSER_CDMS -DENABLE_CONFIGURATION_POLICY -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DVIDEO_HOLE=1 -DENABLE_LOAD_COMPLETION_HACKS=1 -DNACL_WINDOWS=0 -DNACL_LINUX=1 -DNACL_OSX=0 -DNACL_ANDROID=1 -DFULL_SAFE_BROWSING -DMOJO_USE_SYSTEM_IMPL -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DAUTOFILL_ENABLE_SYNC -DPASSWORD_MANAGER_ENABLE_SYNC '-DPRECACHE_CONFIG_SETTINGS_URL="https://www.gstatic.com/chrome/wifiprefetch/precache_config"' '-DPRECACHE_MANIFEST_URL_PREFIX="https://www.gstatic.com/chrome/wifiprefetch/precache_manifest_"' -DAPPCACHE_USE_SIMPLE_CACHE -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT -DSK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER=1 -DSK_SUPPORT_LEGACY_TEXTRENDERMODE -DSK_LEGACY_NO_DISTANCE_FIELD_PATHS -DSK_BUILD_FOR_ANDROID -DSK_USE_POSIX_THREADS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DANDROID -DPOSIX -DWEBRTC_POSIX -DLIBXML_STATIC -DPOSIX_AVOID_MMAP -DMEDIA_DISABLE_LIBVPX -DXML_STATIC -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_LINUX -DWEBRTC_ANDROID -DWEBRTC_ANDROID_OPENSLES -DMESA_EGL_NO_X11_HEADERS -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen -I../.. -Iobj/chrome/browser.gen -I../../third_party/khronos -I../../gpu -I../../skia/config -I../../third_party/WebKit/Source -Igen/angle -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/dom_distiller_js/package/proto_gen -Igen/chrome -Igen/components/strings -I../../third_party/WebKit -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/cacheinvalidation/google/cacheinvalidation -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/webrtc/overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../testing/gtest/include -I../../third_party -I../../third_party/libxml/linux/include -I../../third_party/libxml/src/include -I../../third_party/zlib -Igen/ui/resources -I../../third_party/re2 -Igen/content/app/resources/ -I../../third_party/expat/files/lib -I../../third_party/leveldatabase/src/include -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase -I../../third_party/libyuv/include -I../../third_party/libyuv -I../../third_party/npapi -I../../third_party/npapi/bindings -Igen/ui/gl -I../../third_party/mesa/src/include -I../../v8/include -Igen/policy --param=ssp-buffer-size=4 -Werror -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-unused-local-typedefs -ffunction-sections -funwind-tables -g -fno-short-enums -finline-limit=64 -Wa,--noexecstack --sysroot=/mnt/data/b/build/slave/Android_Arm64_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-21/arch-arm64 -isystem/mnt/data/b/build/slave/Android_Arm64_Builder__dbg_/build/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -gdwarf-4 -fdata-sections -ffunction-sections -funwind-tables -g1 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-narrowing -Wno-literal-suffix -c ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc -o obj/chrome/browser/android/enhanced_bookmarks/browser.enhanced_bookmarks_bridge.o ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc: In constructor 'enhanced_bookmarks::android::EnhancedBookmarksBridge::EnhancedBookmarksBridge(JNIEnv*, jobject, Profile*)': ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc:52:67:error: invalid new-expression of abstract class type 'enhanced_bookmarks::BookmarkServerSearchService' EnhancedBookmarkModelFactory::GetForBrowserContext(profile_))); ^ In file included from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.h:12:0, from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc:5: ../../components/enhanced_bookmarks/bookmark_server_search_service.h:21:7: note: because the following virtual functions are pure within 'enhanced_bookmarks::BookmarkServerSearchService': class BookmarkServerSearchService : public BookmarkServerService { ^ In file included from ../../components/enhanced_bookmarks/bookmark_server_service.h:11:0, from ../../components/enhanced_bookmarks/bookmark_server_search_service.h:12, from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.h:12, from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc:5: ../../components/enhanced_bookmarks/enhanced_bookmark_model_observer.h:29:16: note: virtual void enhanced_bookmarks::EnhancedBookmarkModelObserver::EnhancedBookmarkNodeChanged(const BookmarkNode*) virtual void EnhancedBookmarkNodeChanged(const BookmarkNode* node) = 0; ^ In file included from ../../storage/browser/fileapi/plugin_private_file_system_backend.h:13:0, from ../../storage/browser/fileapi/file_system_context.h:20, from ../../content/public/browser/content_browser_client.h:30, from ../../chrome/browser/profiles/profile.h:17, from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.h:10, from ../../chrome/browser/android/enhanced_bookmarks/enhanced_bookmarks_bridge.cc:5: ../../storage/browser/fileapi/file_system_backend.h: At global scope: ../../storage/browser/fileapi/file_system_backend.h:43:13:error: 'storage::kMaximumLength' defined but not used [-Werror=unused-variable] const int64 kMaximumLength = std::numeric_limits<int64>::max(); Original issue's description: > Reduce frequency of requesting bookmark clusters. > > Currently, we fetch for bookmarks on SyncCycleCompleted. We > actually just want to trigger a request for clusters when > bookmarks change due to a SyncCycle. By watching for > ExtensiveChanges from the BookmarksModel and saving some > state, we can more accurately determine this. > > BUG=424254 > > Committed: https://crrev.com/2d0c8cfc2d67eea473132d8582430c21529ce897 > Cr-Commit-Position: refs/heads/master@{#302111} TBR=yfriedman@chromium.org,kkimlabs@chromium.org,noyau@chromium.org,mcolbert@chromium.org,danduong@chromium.org NOTREECHECKS=true NOTRY=true BUG=424254 Review URL: https://codereview.chromium.org/693513003 Cr-Commit-Position: refs/heads/master@{#302118}
Diffstat (limited to 'components/enhanced_bookmarks')
-rw-r--r--components/enhanced_bookmarks/bookmark_server_cluster_service.cc5
-rw-r--r--components/enhanced_bookmarks/bookmark_server_cluster_service.h1
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model.cc7
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model.h2
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model_observer.h3
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc17
6 files changed, 0 insertions, 35 deletions
diff --git a/components/enhanced_bookmarks/bookmark_server_cluster_service.cc b/components/enhanced_bookmarks/bookmark_server_cluster_service.cc
index 2eeb45e..0d85539 100644
--- a/components/enhanced_bookmarks/bookmark_server_cluster_service.cc
+++ b/components/enhanced_bookmarks/bookmark_server_cluster_service.cc
@@ -198,11 +198,6 @@ void BookmarkServerClusterService::EnhancedBookmarkRemoved(
// filtered in ClustersForBookmark() this is not strictly necessary.
}
-void BookmarkServerClusterService::EnhancedBookmarkNodeChanged(
- const BookmarkNode* node) {
- // Nothing to do.
-}
-
void BookmarkServerClusterService::EnhancedBookmarkAllUserNodesRemoved() {
if (!cluster_data_.empty()) {
ClusterMap empty;
diff --git a/components/enhanced_bookmarks/bookmark_server_cluster_service.h b/components/enhanced_bookmarks/bookmark_server_cluster_service.h
index cc3ae51..717d49f 100644
--- a/components/enhanced_bookmarks/bookmark_server_cluster_service.h
+++ b/components/enhanced_bookmarks/bookmark_server_cluster_service.h
@@ -67,7 +67,6 @@ class BookmarkServerClusterService : public KeyedService,
void EnhancedBookmarkModelLoaded() override;
void EnhancedBookmarkAdded(const BookmarkNode* node) override;
void EnhancedBookmarkRemoved(const BookmarkNode* node) override;
- void EnhancedBookmarkNodeChanged(const BookmarkNode* node) override;
void EnhancedBookmarkAllUserNodesRemoved() override;
void EnhancedBookmarkRemoteIdChanged(const BookmarkNode* node,
const std::string& old_remote_id,
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model.cc b/components/enhanced_bookmarks/enhanced_bookmark_model.cc
index ffcc02a..ba54759 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model.cc
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model.cc
@@ -321,13 +321,6 @@ void EnhancedBookmarkModel::BookmarkNodeRemoved(
EnhancedBookmarkModelObserver, observers_, EnhancedBookmarkRemoved(node));
}
-void EnhancedBookmarkModel::BookmarkNodeChanged(BookmarkModel* model,
- const BookmarkNode* node) {
- FOR_EACH_OBSERVER(
- EnhancedBookmarkModelObserver, observers_,
- EnhancedBookmarkNodeChanged(node));
-}
-
void EnhancedBookmarkModel::OnWillChangeBookmarkMetaInfo(
BookmarkModel* model,
const BookmarkNode* node) {
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model.h b/components/enhanced_bookmarks/enhanced_bookmark_model.h
index 4196f64..d708d8d 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model.h
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model.h
@@ -149,8 +149,6 @@ class EnhancedBookmarkModel : public KeyedService,
int old_index,
const BookmarkNode* node,
const std::set<GURL>& removed_urls) override;
- void BookmarkNodeChanged(BookmarkModel* model,
- const BookmarkNode* node) override;
void OnWillChangeBookmarkMetaInfo(BookmarkModel* model,
const BookmarkNode* node) override;
void BookmarkMetaInfoChanged(BookmarkModel* model,
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
index eb83b57..5ebfa16 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model_observer.h
@@ -25,9 +25,6 @@ class EnhancedBookmarkModelObserver {
// Called when a node is removed from the model.
virtual void EnhancedBookmarkRemoved(const BookmarkNode* node) = 0;
- // Called when a node has changed.
- virtual void EnhancedBookmarkNodeChanged(const BookmarkNode* node) = 0;
-
// Called when all user editable nodes are removed from the model.
virtual void EnhancedBookmarkAllUserNodesRemoved() = 0;
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc b/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
index 0d12de1..f1b8994 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
@@ -35,12 +35,10 @@ class EnhancedBookmarkModelTest
shutting_down_calls_(0),
added_calls_(0),
removed_calls_(0),
- changed_calls_(0),
all_user_nodes_removed_calls_(0),
remote_id_changed_calls_(0),
last_added_(NULL),
last_removed_(NULL),
- last_changed_(NULL),
last_remote_id_node_(NULL) {}
~EnhancedBookmarkModelTest() override {}
@@ -120,10 +118,6 @@ class EnhancedBookmarkModelTest
removed_calls_++;
last_removed_ = node;
}
- void EnhancedBookmarkNodeChanged(const BookmarkNode* node) override {
- changed_calls_++;
- last_changed_ = node;
- }
void EnhancedBookmarkAllUserNodesRemoved() override {
all_user_nodes_removed_calls_++;
}
@@ -141,14 +135,12 @@ class EnhancedBookmarkModelTest
int shutting_down_calls_;
int added_calls_;
int removed_calls_;
- int changed_calls_;
int all_user_nodes_removed_calls_;
int remote_id_changed_calls_;
// Observer parameter cache:
const BookmarkNode* last_added_;
const BookmarkNode* last_removed_;
- const BookmarkNode* last_changed_;
const BookmarkNode* last_remote_id_node_;
std::string last_old_remote_id_;
std::string last_remote_id_;
@@ -600,15 +592,6 @@ TEST_F(EnhancedBookmarkModelTest, ObserverNodeRemovedEvent) {
EXPECT_EQ(folder, last_removed_);
}
-TEST_F(EnhancedBookmarkModelTest, ObserverNodeChangedEvent) {
- const BookmarkNode* node = AddBookmark();
-
- EXPECT_EQ(0, changed_calls_);
- bookmark_model_->SetTitle(node, base::ASCIIToUTF16("New Title"));
- EXPECT_EQ(1, changed_calls_);
- EXPECT_EQ(node, last_changed_);
-}
-
TEST_F(EnhancedBookmarkModelTest, ObserverAllUserNodesRemovedEvent) {
AddBookmark();
AddFolder();