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

Side by Side Diff: components/favicon/core/favicon_driver_impl.cc

Issue 1272413002: Remove useless FaviconHandler::PageChangedSinceFaviconWasRequested() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/favicon/core/favicon_driver_impl.h" 5 #include "components/favicon/core/favicon_driver_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 } 95 }
96 96
97 bool FaviconDriverImpl::IsBookmarked(const GURL& url) { 97 bool FaviconDriverImpl::IsBookmarked(const GURL& url) {
98 return bookmark_model_ && bookmark_model_->IsBookmarked(url); 98 return bookmark_model_ && bookmark_model_->IsBookmarked(url);
99 } 99 }
100 100
101 void FaviconDriverImpl::OnFaviconAvailable(const gfx::Image& image, 101 void FaviconDriverImpl::OnFaviconAvailable(const gfx::Image& image,
102 const GURL& icon_url, 102 const GURL& icon_url,
103 bool is_active_favicon) { 103 bool is_active_favicon) {
104 if (!ShouldSendFaviconAvailableNotifications())
105 return;
106
104 if (is_active_favicon) { 107 if (is_active_favicon) {
105 bool icon_url_changed = GetActiveFaviconURL() != icon_url; 108 bool icon_url_changed = GetActiveFaviconURL() != icon_url;
106 // No matter what happens, we need to mark the favicon as being set. 109 // No matter what happens, we need to mark the favicon as being set.
107 SetActiveFaviconValidity(true); 110 SetActiveFaviconValidity(true);
108 SetActiveFaviconURL(icon_url); 111 SetActiveFaviconURL(icon_url);
109 112
110 if (image.IsEmpty()) 113 if (image.IsEmpty())
111 return; 114 return;
112 115
113 SetActiveFaviconImage(image); 116 SetActiveFaviconImage(image);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 const std::vector<FaviconURL>& candidates) { 166 const std::vector<FaviconURL>& candidates) {
164 DCHECK(!candidates.empty()); 167 DCHECK(!candidates.empty());
165 favicon_handler_->OnUpdateFaviconURL(candidates); 168 favicon_handler_->OnUpdateFaviconURL(candidates);
166 if (touch_icon_handler_.get()) 169 if (touch_icon_handler_.get())
167 touch_icon_handler_->OnUpdateFaviconURL(candidates); 170 touch_icon_handler_->OnUpdateFaviconURL(candidates);
168 if (large_icon_handler_.get()) 171 if (large_icon_handler_.get())
169 large_icon_handler_->OnUpdateFaviconURL(candidates); 172 large_icon_handler_->OnUpdateFaviconURL(candidates);
170 } 173 }
171 174
172 } // namespace favicon 175 } // namespace favicon
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698