| 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 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 DispatchNotifierGroupChanged(); | 364 DispatchNotifierGroupChanged(); |
| 365 } | 365 } |
| 366 #endif | 366 #endif |
| 367 | 367 |
| 368 void MessageCenterSettingsController::RebuildNotifierGroups(bool notify) { | 368 void MessageCenterSettingsController::RebuildNotifierGroups(bool notify) { |
| 369 notifier_groups_.clear(); | 369 notifier_groups_.clear(); |
| 370 current_notifier_group_ = 0; | 370 current_notifier_group_ = 0; |
| 371 | 371 |
| 372 std::vector<ProfileAttributesEntry*> entries = | 372 std::vector<ProfileAttributesEntry*> entries = |
| 373 profile_attributes_storage_.GetAllProfilesAttributes(); | 373 profile_attributes_storage_.GetAllProfilesAttributes(); |
| 374 for (const auto entry : entries) { | 374 for (auto* entry : entries) { |
| 375 std::unique_ptr<message_center::ProfileNotifierGroup> group( | 375 std::unique_ptr<message_center::ProfileNotifierGroup> group( |
| 376 new message_center::ProfileNotifierGroup( | 376 new message_center::ProfileNotifierGroup( |
| 377 entry->GetAvatarIcon(), entry->GetName(), entry->GetUserName(), | 377 entry->GetAvatarIcon(), entry->GetName(), entry->GetUserName(), |
| 378 entry->GetPath())); | 378 entry->GetPath())); |
| 379 if (group->profile() == NULL) | 379 if (group->profile() == NULL) |
| 380 continue; | 380 continue; |
| 381 | 381 |
| 382 #if defined(OS_CHROMEOS) | 382 #if defined(OS_CHROMEOS) |
| 383 // Allows the active user only. | 383 // Allows the active user only. |
| 384 // UserManager may not exist in some tests. | 384 // UserManager may not exist in some tests. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 FROM_HERE, | 417 FROM_HERE, |
| 418 base::Bind( | 418 base::Bind( |
| 419 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, | 419 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, |
| 420 weak_factory_.GetWeakPtr())); | 420 weak_factory_.GetWeakPtr())); |
| 421 } | 421 } |
| 422 #endif | 422 #endif |
| 423 | 423 |
| 424 if (notify) | 424 if (notify) |
| 425 DispatchNotifierGroupChanged(); | 425 DispatchNotifierGroupChanged(); |
| 426 } | 426 } |
| OLD | NEW |