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

Side by Side Diff: ios/chrome/browser/dom_distiller/distiller_favicon_driver.mm

Issue 2541093002: DO NOT COMMIT (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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.
4
5 #import "ios/chrome/browser/dom_distiller/distiller_favicon_driver.h"
6
7 #include "components/favicon/core/favicon_url.h"
8 #include "components/favicon/ios/favicon_url_util.h"
9 #include "url/gurl.h"
10
11 void DistillerFaviconDriver::CreateForWebState(
12 web::WebState* web_state,
13 favicon::FaviconService* favicon_servic e,
14 history::HistoryService* history_servic e,
15 bookmarks::BookmarkModel* bookmark_mode l,
16 const GURL& url) {
17 if (FromWebState(web_state))
18 return;
19
20 web_state->SetUserData(UserDataKey(),
21 new DistillerFaviconDriver(web_state, favicon_service,
22 history_service, bookmark_model, u rl));
23 }
24
25
26 DistillerFaviconDriver::DistillerFaviconDriver(web::WebState* web_state,
27 favicon::FaviconService* favicon_ service,
28 history::HistoryService* history_service,
29 bookmarks::BookmarkModel* bookmark_model, con st GURL& url)
30 : favicon::WebFaviconDriver(web_state, favicon_service, history_service, bookmar k_model),url_(url) {
31 }
32
33 DistillerFaviconDriver::~DistillerFaviconDriver() {
34 }
35
36 void DistillerFaviconDriver::FaviconUrlUpdated(
37 const std::vector<web::FaviconURL>& can didates) {
38 OnUpdateFaviconURL(url_, favicon::FaviconURLsFromWebFaviconURLs(candidates));
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698