1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/favicon/chrome_favicon_client.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/favicon/favicon_service_factory.h"
9 #include "components/bookmarks/browser/bookmark_model.h"
13 ChromeFaviconClient::ChromeFaviconClient(Profile
* profile
) : profile_(profile
) {
16 ChromeFaviconClient::~ChromeFaviconClient() {
19 FaviconService
* ChromeFaviconClient::GetFaviconService() {
20 return FaviconServiceFactory::GetForProfile(profile_
,
21 Profile::EXPLICIT_ACCESS
);
24 bool ChromeFaviconClient::IsBookmarked(const GURL
& url
) {
25 BookmarkModel
* bookmark_model
= BookmarkModelFactory::GetForProfile(profile_
);
26 return bookmark_model
&& bookmark_model
->IsBookmarked(url
);