| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/chrome_favicon_client.h" | 5 #include "chrome/browser/favicon/chrome_favicon_client.h" |
| 6 | 6 |
| 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 8 #include "chrome/browser/favicon/favicon_service_factory.h" | 8 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 9 #include "components/bookmarks/browser/bookmark_model.h" | 9 #include "components/bookmarks/browser/bookmark_model.h" |
| 10 | 10 |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 ChromeFaviconClient::ChromeFaviconClient(Profile* profile) : profile_(profile) { | 13 ChromeFaviconClient::ChromeFaviconClient(Profile* profile) : profile_(profile) { |
| 14 } | 14 } |
| 15 | 15 |
| 16 ChromeFaviconClient::~ChromeFaviconClient() { | 16 ChromeFaviconClient::~ChromeFaviconClient() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 FaviconService* ChromeFaviconClient::GetFaviconService() { | 19 FaviconService* ChromeFaviconClient::GetFaviconService() { |
| 20 return FaviconServiceFactory::GetForProfile(profile_, | 20 return FaviconServiceFactory::GetForProfile( |
| 21 Profile::EXPLICIT_ACCESS); | 21 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool ChromeFaviconClient::IsBookmarked(const GURL& url) { | 24 bool ChromeFaviconClient::IsBookmarked(const GURL& url) { |
| 25 BookmarkModel* bookmark_model = BookmarkModelFactory::GetForProfile(profile_); | 25 BookmarkModel* bookmark_model = BookmarkModelFactory::GetForProfile(profile_); |
| 26 return bookmark_model && bookmark_model->IsBookmarked(url); | 26 return bookmark_model && bookmark_model->IsBookmarked(url); |
| 27 } | 27 } |
| OLD | NEW |