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

Side by Side Diff: chrome/browser/extensions/favicon_downloader.cc

Issue 266053003: Remove page IDs from three WebContentsObserver APIs that don't need it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Avi's change Created 6 years, 7 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 | Annotate | Revision Log
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/extensions/favicon_downloader.h" 5 #include "chrome/browser/extensions/favicon_downloader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/favicon/favicon_tab_helper.h" 8 #include "chrome/browser/favicon/favicon_tab_helper.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/common/favicon_url.h" 10 #include "content/public/common/favicon_url.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void FaviconDownloader::DidNavigateMainFrame( 105 void FaviconDownloader::DidNavigateMainFrame(
106 const content::LoadCommittedDetails& details, 106 const content::LoadCommittedDetails& details,
107 const content::FrameNavigateParams& params) { 107 const content::FrameNavigateParams& params) {
108 // Clear all pending requests. 108 // Clear all pending requests.
109 in_progress_requests_.clear(); 109 in_progress_requests_.clear();
110 favicon_map_.clear(); 110 favicon_map_.clear();
111 callback_.Run(false, favicon_map_); 111 callback_.Run(false, favicon_map_);
112 } 112 }
113 113
114 void FaviconDownloader::DidUpdateFaviconURL( 114 void FaviconDownloader::DidUpdateFaviconURL(
115 int32 page_id,
116 const std::vector<content::FaviconURL>& candidates) { 115 const std::vector<content::FaviconURL>& candidates) {
117 // Only consider the first candidates we are given. This prevents pages that 116 // Only consider the first candidates we are given. This prevents pages that
118 // change their favicon from spamming us. 117 // change their favicon from spamming us.
119 if (got_favicon_urls_) 118 if (got_favicon_urls_)
120 return; 119 return;
121 120
122 got_favicon_urls_ = true; 121 got_favicon_urls_ = true;
123 FetchIcons(candidates); 122 FetchIcons(candidates);
124 } 123 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/favicon_downloader.h ('k') | chrome/browser/extensions/favicon_downloader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698