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

Side by Side Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 149643010: Cleanup: Move kChromeUIScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « chrome/browser/favicon/favicon_service.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/favicon/favicon_tab_helper.h" 5 #include "chrome/browser/favicon/favicon_tab_helper.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/favicon/favicon_handler.h" 8 #include "chrome/browser/favicon/favicon_handler.h"
9 #include "chrome/browser/favicon/favicon_service_factory.h" 9 #include "chrome/browser/favicon/favicon_service_factory.h"
10 #include "chrome/browser/favicon/favicon_util.h" 10 #include "chrome/browser/favicon/favicon_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return false; 81 return false;
82 } 82 }
83 83
84 bool FaviconTabHelper::ShouldDisplayFavicon() { 84 bool FaviconTabHelper::ShouldDisplayFavicon() {
85 // Always display a throbber during pending loads. 85 // Always display a throbber during pending loads.
86 const NavigationController& controller = web_contents()->GetController(); 86 const NavigationController& controller = web_contents()->GetController();
87 if (controller.GetLastCommittedEntry() && controller.GetPendingEntry()) 87 if (controller.GetLastCommittedEntry() && controller.GetPendingEntry())
88 return true; 88 return true;
89 89
90 GURL url = web_contents()->GetURL(); 90 GURL url = web_contents()->GetURL();
91 if (url.SchemeIs(chrome::kChromeUIScheme) && 91 if (url.SchemeIs(content::kChromeUIScheme) &&
92 url.host() == chrome::kChromeUINewTabHost) { 92 url.host() == chrome::kChromeUINewTabHost) {
93 return false; 93 return false;
94 } 94 }
95 95
96 // No favicon on Instant New Tab Pages. 96 // No favicon on Instant New Tab Pages.
97 if (chrome::IsInstantNTP(web_contents())) 97 if (chrome::IsInstantNTP(web_contents()))
98 return false; 98 return false;
99 99
100 return true; 100 return true;
101 } 101 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 favicon_service->UnableToDownloadFavicon(image_url); 202 favicon_service->UnableToDownloadFavicon(image_url);
203 } 203 }
204 204
205 favicon_handler_->OnDidDownloadFavicon( 205 favicon_handler_->OnDidDownloadFavicon(
206 id, image_url, bitmaps, original_bitmap_sizes); 206 id, image_url, bitmaps, original_bitmap_sizes);
207 if (touch_icon_handler_.get()) { 207 if (touch_icon_handler_.get()) {
208 touch_icon_handler_->OnDidDownloadFavicon( 208 touch_icon_handler_->OnDidDownloadFavicon(
209 id, image_url, bitmaps, original_bitmap_sizes); 209 id, image_url, bitmaps, original_bitmap_sizes);
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « chrome/browser/favicon/favicon_service.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698