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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 DCHECK(notifiers); | 202 DCHECK(notifiers); |
203 if (notifier_groups_.size() <= current_notifier_group_) | 203 if (notifier_groups_.size() <= current_notifier_group_) |
204 return; | 204 return; |
205 // Temporarily use the last used profile to prevent chrome from crashing when | 205 // Temporarily use the last used profile to prevent chrome from crashing when |
206 // the default profile is not loaded. | 206 // the default profile is not loaded. |
207 Profile* profile = notifier_groups_[current_notifier_group_]->profile(); | 207 Profile* profile = notifier_groups_[current_notifier_group_]->profile(); |
208 | 208 |
209 DesktopNotificationService* notification_service = | 209 DesktopNotificationService* notification_service = |
210 DesktopNotificationServiceFactory::GetForProfile(profile); | 210 DesktopNotificationServiceFactory::GetForProfile(profile); |
211 | 211 |
212 UErrorCode error; | 212 UErrorCode error = U_ZERO_ERROR; |
213 scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(error)); | 213 scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(error)); |
214 scoped_ptr<NotifierComparator> comparator; | 214 scoped_ptr<NotifierComparator> comparator; |
215 if (!U_FAILURE(error)) | 215 if (!U_FAILURE(error)) |
216 comparator.reset(new NotifierComparator(collator.get())); | 216 comparator.reset(new NotifierComparator(collator.get())); |
217 | 217 |
218 ExtensionService* extension_service = profile->GetExtensionService(); | 218 ExtensionService* extension_service = profile->GetExtensionService(); |
219 const extensions::ExtensionSet* extension_set = | 219 const extensions::ExtensionSet* extension_set = |
220 extension_service->extensions(); | 220 extension_service->extensions(); |
221 // The extension icon size has to be 32x32 at least to load bigger icons if | 221 // The extension icon size has to be 32x32 at least to load bigger icons if |
222 // the icon doesn't exist for the specified size, and in that case it falls | 222 // the icon doesn't exist for the specified size, and in that case it falls |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 // creating a primary profile, and causes an infinite loop. | 545 // creating a primary profile, and causes an infinite loop. |
546 // Thus, it would be better to delay creating group for guest login. | 546 // Thus, it would be better to delay creating group for guest login. |
547 base::MessageLoopProxy::current()->PostTask( | 547 base::MessageLoopProxy::current()->PostTask( |
548 FROM_HERE, | 548 FROM_HERE, |
549 base::Bind( | 549 base::Bind( |
550 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, | 550 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, |
551 weak_factory_.GetWeakPtr())); | 551 weak_factory_.GetWeakPtr())); |
552 } | 552 } |
553 #endif | 553 #endif |
554 } | 554 } |
OLD | NEW |