summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2014-09-22 10:49:41 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-22 17:50:07 +0000
commit80f52c68fbd705cde1f35866998540fb3e60f126 (patch)
tree7bbe0733598c74a2342d7a7528ca60e0b2872369 /components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
parent6060457aff422c0202da9fa0ed1f6243394a5fb1 (diff)
downloadchromium_src-80f52c68fbd705cde1f35866998540fb3e60f126.zip
chromium_src-80f52c68fbd705cde1f35866998540fb3e60f126.tar.gz
chromium_src-80f52c68fbd705cde1f35866998540fb3e60f126.tar.bz2
Fix lifetime of EnhancedBookmarkModel & BookmarkImageService
Unregister BookmarkImageService observer from BookmarkModel in the Shutdown method instead of the destructor to follow the two step shutdown of the profile. Fix a typo in the EnhancedBookmarkModel override of KeyedService Shutdown method (could have been caught by using the OVERRIDE keyword). BUG=None Review URL: https://codereview.chromium.org/588233002 Cr-Commit-Position: refs/heads/master@{#296009}
Diffstat (limited to 'components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc')
-rw-r--r--components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc b/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
index e5b7210..e7d6eff 100644
--- a/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
+++ b/components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc
@@ -51,7 +51,7 @@ class EnhancedBookmarkModelTest
virtual void TearDown() OVERRIDE {
if (model_)
- model_->ShutDown();
+ model_->Shutdown();
model_.reset();
bookmark_model_.reset();
bookmark_client_.reset();
@@ -447,7 +447,7 @@ TEST_F(EnhancedBookmarkModelTest, TestVersionField) {
// Verifies that duplicate nodes are reset when the model is created.
TEST_F(EnhancedBookmarkModelTest, ResetDuplicateNodesOnInitialization) {
- model_->ShutDown();
+ model_->Shutdown();
const BookmarkNode* parent = bookmark_model_->other_node();
const BookmarkNode* node1 = bookmark_model_->AddURL(
@@ -563,7 +563,7 @@ TEST_F(EnhancedBookmarkModelTest, SetMultipleMetaInfo) {
TEST_F(EnhancedBookmarkModelTest, ObserverShuttingDownEvent) {
EXPECT_EQ(0, shutting_down_calls_);
- model_->ShutDown();
+ model_->Shutdown();
EXPECT_EQ(1, shutting_down_calls_);
model_.reset();
}
@@ -645,7 +645,7 @@ TEST_F(EnhancedBookmarkModelTest, ShutDownWhileResetDuplicationScheduled) {
const BookmarkNode* node2 = AddBookmark();
bookmark_model_->SetNodeMetaInfo(node1, "stars.id", "c_1");
bookmark_model_->SetNodeMetaInfo(node2, "stars.id", "c_1");
- model_->ShutDown();
+ model_->Shutdown();
model_.reset();
base::RunLoop().RunUntilIdle();
}