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

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

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/favicon_source.h" 5 #include "chrome/browser/ui/webui/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"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "chrome/browser/favicon/favicon_service_factory.h" 12 #include "chrome/browser/favicon/favicon_service_factory.h"
13 #include "chrome/browser/history/top_sites.h" 13 #include "chrome/browser/history/top_sites_provider.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/search/instant_io_context.h" 15 #include "chrome/browser/search/instant_io_context.h"
16 #include "chrome/browser/sync/open_tabs_ui_delegate.h" 16 #include "chrome/browser/sync/open_tabs_ui_delegate.h"
17 #include "chrome/browser/sync/profile_sync_service.h" 17 #include "chrome/browser/sync/profile_sync_service.h"
18 #include "chrome/browser/sync/profile_sync_service_factory.h" 18 #include "chrome/browser/sync/profile_sync_service_factory.h"
19 #include "chrome/common/favicon/favicon_url_parser.h" 19 #include "chrome/common/favicon/favicon_url_parser.h"
20 #include "chrome/common/url_constants.h" 20 #include "chrome/common/url_constants.h"
21 #include "chrome/grit/locale_settings.h" 21 #include "chrome/grit/locale_settings.h"
22 #include "net/url_request/url_request.h" 22 #include "net/url_request/url_request.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 ui::ScaleFactor resource_scale_factor = 198 ui::ScaleFactor resource_scale_factor =
199 ui::GetSupportedScaleFactor(icon_request.device_scale_factor); 199 ui::GetSupportedScaleFactor(icon_request.device_scale_factor);
200 default_favicon = 200 default_favicon =
201 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale( 201 ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
202 resource_id, resource_scale_factor); 202 resource_id, resource_scale_factor);
203 default_favicons_[favicon_index] = default_favicon; 203 default_favicons_[favicon_index] = default_favicon;
204 } 204 }
205 205
206 icon_request.callback.Run(default_favicon); 206 icon_request.callback.Run(default_favicon);
207 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698