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

Unified Diff: chrome/browser/favicon/favicon_helper.cc

Issue 1208963003: Move GN obj files to target-specific dirs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: \ Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/favicon/favicon_helper.h ('k') | chrome/browser/favicon/favicon_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/favicon_helper.cc
diff --git a/chrome/browser/favicon/favicon_helper.cc b/chrome/browser/favicon/favicon_helper.cc
deleted file mode 100644
index 214c28b278fc8654c25ddec9224900203a63f67e..0000000000000000000000000000000000000000
--- a/chrome/browser/favicon/favicon_helper.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/favicon/favicon_helper.h"
-
-#include "chrome/browser/bookmarks/bookmark_model_factory.h"
-#include "chrome/browser/favicon/favicon_service_factory.h"
-#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/search/search.h"
-#include "chrome/common/url_constants.h"
-#include "content/public/common/favicon_url.h"
-
-namespace favicon {
-
-void CreateContentFaviconDriverForWebContents(
- content::WebContents* web_contents) {
- DCHECK(web_contents);
- if (ContentFaviconDriver::FromWebContents(web_contents))
- return;
-
- Profile* original_profile =
- Profile::FromBrowserContext(web_contents->GetBrowserContext())
- ->GetOriginalProfile();
- return ContentFaviconDriver::CreateForWebContents(
- web_contents, FaviconServiceFactory::GetForProfile(
- original_profile, ServiceAccessType::IMPLICIT_ACCESS),
- HistoryServiceFactory::GetForProfile(original_profile,
- ServiceAccessType::IMPLICIT_ACCESS),
- BookmarkModelFactory::GetForProfileIfExists(original_profile));
-}
-
-bool ShouldDisplayFavicon(content::WebContents* web_contents) {
- // Always display a throbber during pending loads.
- const content::NavigationController& controller =
- web_contents->GetController();
- if (controller.GetLastCommittedEntry() && controller.GetPendingEntry())
- return true;
-
- GURL url = web_contents->GetURL();
- if (url.SchemeIs(content::kChromeUIScheme) &&
- url.host() == chrome::kChromeUINewTabHost) {
- return false;
- }
-
- // No favicon on Instant New Tab Pages.
- if (chrome::IsInstantNTP(web_contents))
- return false;
-
- return true;
-}
-
-} // namespace favicon
« no previous file with comments | « chrome/browser/favicon/favicon_helper.h ('k') | chrome/browser/favicon/favicon_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698