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

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: remove scope_ptr 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
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 std::string url_pattern = iter->primary_pattern.ToString(); 237 std::string url_pattern = iter->primary_pattern.ToString();
238 string16 name = UTF8ToUTF16(url_pattern); 238 string16 name = UTF8ToUTF16(url_pattern);
239 GURL url(url_pattern); 239 GURL url(url_pattern);
240 NotifierId notifier_id(url); 240 NotifierId notifier_id(url);
241 notifiers->push_back(new Notifier( 241 notifiers->push_back(new Notifier(
242 notifier_id, 242 notifier_id,
243 name, 243 name,
244 notification_service->IsNotifierEnabled(notifier_id))); 244 notification_service->IsNotifierEnabled(notifier_id)));
245 patterns_[name] = iter->primary_pattern; 245 patterns_[name] = iter->primary_pattern;
246 FaviconService::FaviconForURLParams favicon_params( 246 FaviconService::FaviconForURLParams favicon_params(
247 profile,
248 url, 247 url,
249 chrome::FAVICON | chrome::TOUCH_ICON, 248 chrome::FAVICON | chrome::TOUCH_ICON,
250 message_center::kSettingsIconSize); 249 message_center::kSettingsIconSize);
251 // Note that favicon service obtains the favicon from history. This means 250 // Note that favicon service obtains the favicon from history. This means
252 // that it will fail to obtain the image if there are no history data for 251 // that it will fail to obtain the image if there are no history data for
253 // that URL. 252 // that URL.
254 favicon_service->GetFaviconImageForURL( 253 favicon_service->GetFaviconImageForURL(
255 favicon_params, 254 favicon_params,
256 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded, 255 base::Bind(&MessageCenterSettingsController::OnFaviconLoaded,
257 base::Unretained(this), url), 256 base::Unretained(this), url),
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 #if defined(OS_CHROMEOS) 396 #if defined(OS_CHROMEOS)
398 // In ChromeOS, the login screen first creates a dummy profile which is not 397 // In ChromeOS, the login screen first creates a dummy profile which is not
399 // actually used, and then the real profile for the user is created when 398 // actually used, and then the real profile for the user is created when
400 // login (or turns into kiosk mode). This profile should be skipped. 399 // login (or turns into kiosk mode). This profile should be skipped.
401 if (chromeos::ProfileHelper::IsSigninProfile(group->profile())) 400 if (chromeos::ProfileHelper::IsSigninProfile(group->profile()))
402 continue; 401 continue;
403 #endif 402 #endif
404 notifier_groups_.push_back(group.release()); 403 notifier_groups_.push_back(group.release());
405 } 404 }
406 } 405 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698