| OLD | NEW |
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 base::UTF8ToUTF16(extension->name()), | 236 base::UTF8ToUTF16(extension->name()), |
| 237 notification_service->IsNotifierEnabled(notifier_id))); | 237 notification_service->IsNotifierEnabled(notifier_id))); |
| 238 app_icon_loader_->FetchImage(extension->id()); | 238 app_icon_loader_->FetchImage(extension->id()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 int app_count = notifiers->size(); | 241 int app_count = notifiers->size(); |
| 242 | 242 |
| 243 ContentSettingsForOneType settings; | 243 ContentSettingsForOneType settings; |
| 244 DesktopNotificationProfileUtil::GetNotificationsSettings(profile, &settings); | 244 DesktopNotificationProfileUtil::GetNotificationsSettings(profile, &settings); |
| 245 | 245 |
| 246 FaviconService* favicon_service = | 246 FaviconService* favicon_service = FaviconServiceFactory::GetForProfile( |
| 247 FaviconServiceFactory::GetForProfile(profile, Profile::EXPLICIT_ACCESS); | 247 profile, ServiceAccessType::EXPLICIT_ACCESS); |
| 248 favicon_tracker_.reset(new base::CancelableTaskTracker()); | 248 favicon_tracker_.reset(new base::CancelableTaskTracker()); |
| 249 patterns_.clear(); | 249 patterns_.clear(); |
| 250 for (ContentSettingsForOneType::const_iterator iter = settings.begin(); | 250 for (ContentSettingsForOneType::const_iterator iter = settings.begin(); |
| 251 iter != settings.end(); ++iter) { | 251 iter != settings.end(); ++iter) { |
| 252 if (iter->primary_pattern == ContentSettingsPattern::Wildcard() && | 252 if (iter->primary_pattern == ContentSettingsPattern::Wildcard() && |
| 253 iter->secondary_pattern == ContentSettingsPattern::Wildcard() && | 253 iter->secondary_pattern == ContentSettingsPattern::Wildcard() && |
| 254 iter->source != "preference") { | 254 iter->source != "preference") { |
| 255 continue; | 255 continue; |
| 256 } | 256 } |
| 257 | 257 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 // another creating a primary profile, and causes an infinite loop. | 517 // another creating a primary profile, and causes an infinite loop. |
| 518 // Thus, it would be better to delay creating group for guest login. | 518 // Thus, it would be better to delay creating group for guest login. |
| 519 base::MessageLoopProxy::current()->PostTask( | 519 base::MessageLoopProxy::current()->PostTask( |
| 520 FROM_HERE, | 520 FROM_HERE, |
| 521 base::Bind( | 521 base::Bind( |
| 522 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, | 522 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, |
| 523 weak_factory_.GetWeakPtr())); | 523 weak_factory_.GetWeakPtr())); |
| 524 } | 524 } |
| 525 #endif | 525 #endif |
| 526 } | 526 } |
| OLD | NEW |