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

Side by Side Diff: chrome/browser/sync/test/integration/sessions_helper.cc

Issue 1133463005: Update all bookmarks which use an icon URL when a favicon's bitmap is updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_do_not_unexpire
Patch Set: Created 5 years, 6 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
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/sync/test/integration/sessions_helper.h" 5 #include "chrome/browser/sync/test/integration/sessions_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 void OnLocalTabModified( 139 void OnLocalTabModified(
140 browser_sync::SyncedTabDelegate* modified_tab) override { 140 browser_sync::SyncedTabDelegate* modified_tab) override {
141 // Unwind to ensure SessionsSyncManager has processed the event. 141 // Unwind to ensure SessionsSyncManager has processed the event.
142 base::MessageLoop::current()->PostTask( 142 base::MessageLoop::current()->PostTask(
143 FROM_HERE, 143 FROM_HERE,
144 base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr())); 144 base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr()));
145 } 145 }
146 146
147 void OnFaviconPageUrlsUpdated( 147 void OnFaviconsChanged(const std::vector<GURL>& /* page_urls */,
148 const std::set<GURL>& updated_page_urls) override { 148 const std::vector<GURL>& /* icon_urls */) override {
149 // Unwind to ensure SessionsSyncManager has processed the event. 149 // Unwind to ensure SessionsSyncManager has processed the event.
150 base::MessageLoop::current()->PostTask( 150 base::MessageLoop::current()->PostTask(
151 FROM_HERE, 151 FROM_HERE,
152 base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr())); 152 base::Bind(&TabEventHandler::QuitLoop, weak_factory_.GetWeakPtr()));
153 } 153 }
154 154
155 private: 155 private:
156 void QuitLoop() { 156 void QuitLoop() {
157 base::MessageLoop::current()->Quit(); 157 base::MessageLoop::current()->Quit();
158 } 158 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 return !checker.TimedOut(); 403 return !checker.TimedOut();
404 } 404 }
405 405
406 void DeleteForeignSession(int index, std::string session_tag) { 406 void DeleteForeignSession(int index, std::string session_tag) {
407 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 407 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
408 test()->GetProfile(index))-> 408 test()->GetProfile(index))->
409 GetOpenTabsUIDelegate()->DeleteForeignSession(session_tag); 409 GetOpenTabsUIDelegate()->DeleteForeignSession(session_tag);
410 } 410 }
411 411
412 } // namespace sessions_helper 412 } // namespace sessions_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698