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

Side by Side Diff: ios/chrome/browser/ui/webui/history/favicon_source.cc

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "ios/chrome/browser/ui/webui/history/favicon_source.h" 5 #include "ios/chrome/browser/ui/webui/history/favicon_source.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 22 matching lines...) Expand all
33 request_path(path), 33 request_path(path),
34 size_in_dip(size), 34 size_in_dip(size),
35 device_scale_factor(scale) {} 35 device_scale_factor(scale) {}
36 36
37 FaviconSource::IconRequest::IconRequest(const IconRequest& other) = default; 37 FaviconSource::IconRequest::IconRequest(const IconRequest& other) = default;
38 38
39 FaviconSource::IconRequest::~IconRequest() {} 39 FaviconSource::IconRequest::~IconRequest() {}
40 40
41 FaviconSource::FaviconSource(favicon::FaviconService* favicon_service, 41 FaviconSource::FaviconSource(favicon::FaviconService* favicon_service,
42 const scoped_refptr<history::TopSites>& top_sites, 42 const scoped_refptr<history::TopSites>& top_sites,
43 sync_driver::SyncService* sync_service) 43 syncer::SyncService* sync_service)
44 : favicon_service_(favicon_service), 44 : favicon_service_(favicon_service),
45 top_sites_(top_sites), 45 top_sites_(top_sites),
46 sync_service_(sync_service) {} 46 sync_service_(sync_service) {}
47 47
48 FaviconSource::~FaviconSource() {} 48 FaviconSource::~FaviconSource() {}
49 49
50 std::string FaviconSource::GetSource() const { 50 std::string FaviconSource::GetSource() const {
51 return std::string("touch-icon"); 51 return std::string("touch-icon");
52 } 52 }
53 53
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ui::ScaleFactor resource_scale_factor = 174 ui::ScaleFactor resource_scale_factor =
175 ui::GetSupportedScaleFactor(icon_request.device_scale_factor); 175 ui::GetSupportedScaleFactor(icon_request.device_scale_factor);
176 default_favicon = 176 default_favicon =
177 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 177 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
178 resource_id, resource_scale_factor); 178 resource_id, resource_scale_factor);
179 default_favicons_[favicon_index] = default_favicon; 179 default_favicons_[favicon_index] = default_favicon;
180 } 180 }
181 181
182 icon_request.callback.Run(default_favicon); 182 icon_request.callback.Run(default_favicon);
183 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698