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

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

Issue 303453004: Move the FaviconClient implementation to ChromeFaviconClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed include. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/favicon/chrome_favicon_client.cc
diff --git a/chrome/browser/favicon/chrome_favicon_client.cc b/chrome/browser/favicon/chrome_favicon_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..68bc7d9c596112e30c5ef045185a7b0947e3b445
--- /dev/null
+++ b/chrome/browser/favicon/chrome_favicon_client.cc
@@ -0,0 +1,27 @@
+// Copyright 2014 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/chrome_favicon_client.h"
+
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
+#include "chrome/browser/favicon/favicon_service_factory.h"
+#include "components/bookmarks/browser/bookmark_model.h"
+
+class Profile;
+
+ChromeFaviconClient::ChromeFaviconClient(Profile* profile) : profile_(profile) {
+}
+
+ChromeFaviconClient::~ChromeFaviconClient() {
+}
+
+FaviconService* ChromeFaviconClient::GetFaviconService() {
+ return FaviconServiceFactory::GetForProfile(profile_,
+ Profile::EXPLICIT_ACCESS);
+}
+
+bool ChromeFaviconClient::IsBookmarked(const GURL& url) {
+ BookmarkModel* bookmark_model = BookmarkModelFactory::GetForProfile(profile_);
+ return bookmark_model && bookmark_model->IsBookmarked(url);
+}

Powered by Google App Engine
This is Rietveld 408576698