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

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

Issue 56143002: Make FaviconService() use Porfile as parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test but break the DEPS Created 7 years, 1 month 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
« 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::string url_pattern = iter->primary_pattern.ToString(); 240 std::string url_pattern = iter->primary_pattern.ToString();
241 string16 name = UTF8ToUTF16(url_pattern); 241 string16 name = UTF8ToUTF16(url_pattern);
242 GURL url(url_pattern); 242 GURL url(url_pattern);
243 NotifierId notifier_id(url); 243 NotifierId notifier_id(url);
244 notifiers->push_back(new Notifier( 244 notifiers->push_back(new Notifier(
245 notifier_id, 245 notifier_id,
246 name, 246 name,
247 notification_service->IsNotifierEnabled(notifier_id))); 247 notification_service->IsNotifierEnabled(notifier_id)));
248 patterns_[name] = iter->primary_pattern; 248 patterns_[name] = iter->primary_pattern;
249 FaviconService::FaviconForURLParams favicon_params( 249 FaviconService::FaviconForURLParams favicon_params(
250 profile,
251 url, 250 url,
252 chrome::FAVICON | chrome::TOUCH_ICON, 251 chrome::FAVICON | chrome::TOUCH_ICON,
253 message_center::kSettingsIconSize); 252 message_center::kSettingsIconSize);
254 // Note that favicon service obtains the favicon from history. This means 253 // Note that favicon service obtains the favicon from history. This means
255 // that it will fail to obtain the image if there are no history data for 254 // that it will fail to obtain the image if there are no history data for
256 // that URL. 255 // that URL.
257 favicon_service->GetFaviconImageForURL( 256 favicon_service->GetFaviconImageForURL(
258 favicon_params, 257 favicon_params,
259 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded, 258 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded,
260 base::Unretained(this), url), 259 base::Unretained(this), url),
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 #if defined(OS_CHROMEOS) 442 #if defined(OS_CHROMEOS)
444 // In ChromeOS, the login screen first creates a dummy profile which is not 443 // In ChromeOS, the login screen first creates a dummy profile which is not
445 // actually used, and then the real profile for the user is created when 444 // actually used, and then the real profile for the user is created when
446 // login (or turns into kiosk mode). This profile should be skipped. 445 // login (or turns into kiosk mode). This profile should be skipped.
447 if (chromeos::ProfileHelper::IsSigninProfile(group->profile())) 446 if (chromeos::ProfileHelper::IsSigninProfile(group->profile()))
448 continue; 447 continue;
449 #endif 448 #endif
450 notifier_groups_.push_back(group.release()); 449 notifier_groups_.push_back(group.release());
451 } 450 }
452 } 451 }
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