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

Side by Side Diff: chrome/browser/history/android/android_provider_backend_unittest.cc

Issue 773103004: Remove NOTIFICATION_HISTORY_URLS_DELETED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove NotificationObserver from InMemoryURLIndex Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/history/android/android_provider_backend.h" 5 #include "chrome/browser/history/android/android_provider_backend.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void NotifyFaviconChanged(const std::set<GURL>& url) override { 77 void NotifyFaviconChanged(const std::set<GURL>& url) override {
78 favicon_changed_.reset(new std::set<GURL>(url.begin(), url.end())); 78 favicon_changed_.reset(new std::set<GURL>(url.begin(), url.end()));
79 } 79 }
80 void NotifyURLVisited(ui::PageTransition, 80 void NotifyURLVisited(ui::PageTransition,
81 const history::URLRow& row, 81 const history::URLRow& row,
82 const history::RedirectList& redirects, 82 const history::RedirectList& redirects,
83 base::Time visit_time) override {} 83 base::Time visit_time) override {}
84 void NotifyURLsModified(const history::URLRows& rows) override { 84 void NotifyURLsModified(const history::URLRows& rows) override {
85 modified_details_.reset(new history::URLRows(rows)); 85 modified_details_.reset(new history::URLRows(rows));
86 } 86 }
87 void NotifyURLsDeleted(
88 const history::URLsDeletedDetails& urls_deleted_details) override {
89 deleted_details_.reset(new history::URLRows(urls_deleted_details.rows));
90 }
87 void BroadcastNotifications( 91 void BroadcastNotifications(
88 int type, 92 int type,
89 scoped_ptr<HistoryDetails> details) override { 93 scoped_ptr<HistoryDetails> details) override {
90 DCHECK_EQ(type, chrome::NOTIFICATION_HISTORY_URLS_DELETED);
sdefresne 2014/12/04 17:21:12 nit: NOTREACHED();
nshaik 2014/12/07 09:34:49 Done.
91 scoped_ptr<URLsDeletedDetails> urls_deleted_details(
92 static_cast<URLsDeletedDetails*>(details.release()));
93 deleted_details_.reset(new history::URLRows(urls_deleted_details->rows));
94 } 94 }
95 void DBLoaded() override {} 95 void DBLoaded() override {}
96 96
97 history::URLRows* deleted_details() const { return deleted_details_.get(); } 97 history::URLRows* deleted_details() const { return deleted_details_.get(); }
98 98
99 history::URLRows* modified_details() const { return modified_details_.get(); } 99 history::URLRows* modified_details() const { return modified_details_.get(); }
100 100
101 std::set<GURL>* favicon_changed() const { return favicon_changed_.get(); } 101 std::set<GURL>* favicon_changed() const { return favicon_changed_.get(); }
102 102
103 void ResetDetails() { 103 void ResetDetails() {
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 update_args, &update_count)); 2142 update_args, &update_count));
2143 // Verify notifications. 2143 // Verify notifications.
2144 EXPECT_FALSE(notifier_.deleted_details()); 2144 EXPECT_FALSE(notifier_.deleted_details());
2145 ASSERT_TRUE(notifier_.modified_details()); 2145 ASSERT_TRUE(notifier_.modified_details());
2146 ASSERT_EQ(1u, notifier_.modified_details()->size()); 2146 ASSERT_EQ(1u, notifier_.modified_details()->size());
2147 // No favicon will be updated as thumbnail database is missing. 2147 // No favicon will be updated as thumbnail database is missing.
2148 EXPECT_FALSE(notifier_.favicon_changed()); 2148 EXPECT_FALSE(notifier_.favicon_changed());
2149 } 2149 }
2150 2150
2151 } // namespace history 2151 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698