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

Side by Side Diff: components/favicon/content/content_favicon_driver.cc

Issue 1399913002: Stop FaviconHandler from querying GetActiveFaviconValidity() part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@favicon_remove_validity_check
Patch Set: Created 5 years, 2 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/content/content_favicon_driver.h" 5 #include "components/favicon/content/content_favicon_driver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "components/favicon/content/favicon_url_util.h" 8 #include "components/favicon/content/favicon_url_util.h"
9 #include "components/favicon/core/favicon_service.h" 9 #include "components/favicon/core/favicon_service.h"
10 #include "components/favicon/core/favicon_url.h" 10 #include "components/favicon/core/favicon_url.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(web_contents()); 106 DCHECK(web_contents());
107 return web_contents()->GetBrowserContext()->IsOffTheRecord(); 107 return web_contents()->GetBrowserContext()->IsOffTheRecord();
108 } 108 }
109 109
110 GURL ContentFaviconDriver::GetActiveURL() { 110 GURL ContentFaviconDriver::GetActiveURL() {
111 content::NavigationEntry* entry = 111 content::NavigationEntry* entry =
112 web_contents()->GetController().GetLastCommittedEntry(); 112 web_contents()->GetController().GetLastCommittedEntry();
113 return entry ? entry->GetURL() : GURL(); 113 return entry ? entry->GetURL() : GURL();
114 } 114 }
115 115
116 bool ContentFaviconDriver::GetActiveFaviconValidity() {
117 return GetFaviconStatus().valid;
118 }
119
120 void ContentFaviconDriver::SetActiveFaviconValidity(bool valid) { 116 void ContentFaviconDriver::SetActiveFaviconValidity(bool valid) {
121 GetFaviconStatus().valid = valid; 117 GetFaviconStatus().valid = valid;
122 } 118 }
123 119
124 GURL ContentFaviconDriver::GetActiveFaviconURL() { 120 GURL ContentFaviconDriver::GetActiveFaviconURL() {
125 return GetFaviconStatus().url; 121 return GetFaviconStatus().url;
126 } 122 }
127 123
128 void ContentFaviconDriver::SetActiveFaviconURL(const GURL& url) { 124 void ContentFaviconDriver::SetActiveFaviconURL(const GURL& url) {
129 GetFaviconStatus().url = url; 125 GetFaviconStatus().url = url;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // redownloaded. 193 // redownloaded.
198 GURL url = details.entry->GetURL(); 194 GURL url = details.entry->GetURL();
199 if (url != bypass_cache_page_url_) 195 if (url != bypass_cache_page_url_)
200 bypass_cache_page_url_ = GURL(); 196 bypass_cache_page_url_ = GURL();
201 197
202 // Get the favicon, either from history or request it from the net. 198 // Get the favicon, either from history or request it from the net.
203 FetchFavicon(url); 199 FetchFavicon(url);
204 } 200 }
205 201
206 } // namespace favicon 202 } // namespace favicon
OLDNEW
« no previous file with comments | « components/favicon/content/content_favicon_driver.h ('k') | components/favicon/core/favicon_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698