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

Side by Side Diff: chrome/browser/notifications/message_center_settings_controller.cc

Issue 331163003: [Refactor] Change FaviconService API to take in a desired pixel size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/jumplist_win.cc ('k') | chrome/browser/sync/glue/favicon_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/notifications/message_center_settings_controller.h" 5 #include "chrome/browser/notifications/message_center_settings_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/string_compare.h" 10 #include "base/i18n/string_compare.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 264
265 std::string url_pattern = iter->primary_pattern.ToString(); 265 std::string url_pattern = iter->primary_pattern.ToString();
266 base::string16 name = base::UTF8ToUTF16(url_pattern); 266 base::string16 name = base::UTF8ToUTF16(url_pattern);
267 GURL url(url_pattern); 267 GURL url(url_pattern);
268 NotifierId notifier_id(url); 268 NotifierId notifier_id(url);
269 notifiers->push_back(new Notifier( 269 notifiers->push_back(new Notifier(
270 notifier_id, 270 notifier_id,
271 name, 271 name,
272 notification_service->IsNotifierEnabled(notifier_id))); 272 notification_service->IsNotifierEnabled(notifier_id)));
273 patterns_[name] = iter->primary_pattern; 273 patterns_[name] = iter->primary_pattern;
274 FaviconService::FaviconForPageURLParams favicon_params(
275 url,
276 favicon_base::FAVICON | favicon_base::TOUCH_ICON,
277 message_center::kSettingsIconSize);
278 // Note that favicon service obtains the favicon from history. This means 274 // Note that favicon service obtains the favicon from history. This means
279 // that it will fail to obtain the image if there are no history data for 275 // that it will fail to obtain the image if there are no history data for
280 // that URL. 276 // that URL.
281 favicon_service->GetFaviconImageForPageURL( 277 favicon_service->GetFaviconImageForPageURL(
282 favicon_params, 278 url,
283 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded, 279 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded,
284 base::Unretained(this), 280 base::Unretained(this),
285 url), 281 url),
286 favicon_tracker_.get()); 282 favicon_tracker_.get());
287 } 283 }
288 284
289 // Screenshot notification feature is only for ChromeOS. See crbug.com/238358 285 // Screenshot notification feature is only for ChromeOS. See crbug.com/238358
290 #if defined(OS_CHROMEOS) 286 #if defined(OS_CHROMEOS)
291 const base::string16 screenshot_name = 287 const base::string16 screenshot_name =
292 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME); 288 l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_NOTIFIER_SCREENSHOT_NAME);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // another creating a primary profile, and causes an infinite loop. 518 // another creating a primary profile, and causes an infinite loop.
523 // Thus, it would be better to delay creating group for guest login. 519 // Thus, it would be better to delay creating group for guest login.
524 base::MessageLoopProxy::current()->PostTask( 520 base::MessageLoopProxy::current()->PostTask(
525 FROM_HERE, 521 FROM_HERE,
526 base::Bind( 522 base::Bind(
527 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, 523 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin,
528 weak_factory_.GetWeakPtr())); 524 weak_factory_.GetWeakPtr()));
529 } 525 }
530 #endif 526 #endif
531 } 527 }
OLDNEW
« no previous file with comments | « chrome/browser/jumplist_win.cc ('k') | chrome/browser/sync/glue/favicon_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698