summaryrefslogtreecommitdiffstats
path: root/chrome/browser/favicon/chrome_favicon_client.cc
blob: 68bc7d9c596112e30c5ef045185a7b0947e3b445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}