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 "ui/message_center/fake_notifier_settings_provider.h" | 5 #include "ui/message_center/fake_notifier_settings_provider.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "ui/gfx/image/image.h" | 8 #include "ui/gfx/image/image.h" |
9 | 9 |
10 namespace message_center { | 10 namespace message_center { |
(...skipping 10 matching lines...) Expand all Loading... |
21 notifier_settings_requested_count_(0u) { } | 21 notifier_settings_requested_count_(0u) { } |
22 | 22 |
23 FakeNotifierSettingsProvider::FakeNotifierSettingsProvider( | 23 FakeNotifierSettingsProvider::FakeNotifierSettingsProvider( |
24 const std::vector<Notifier*>& notifiers) | 24 const std::vector<Notifier*>& notifiers) |
25 : closed_called_count_(0), | 25 : closed_called_count_(0), |
26 active_item_index_(0), | 26 active_item_index_(0), |
27 notifier_settings_requested_count_(0u) { | 27 notifier_settings_requested_count_(0u) { |
28 NotifierGroupItem item; | 28 NotifierGroupItem item; |
29 item.group = new NotifierGroup(gfx::Image(), | 29 item.group = new NotifierGroup(gfx::Image(), |
30 base::UTF8ToUTF16("Fake name"), | 30 base::UTF8ToUTF16("Fake name"), |
31 base::UTF8ToUTF16("fake@email.com"), | 31 base::UTF8ToUTF16("fake@email.com")); |
32 true); | |
33 item.notifiers = notifiers; | 32 item.notifiers = notifiers; |
34 items_.push_back(item); | 33 items_.push_back(item); |
35 } | 34 } |
36 | 35 |
37 FakeNotifierSettingsProvider::~FakeNotifierSettingsProvider() { | 36 FakeNotifierSettingsProvider::~FakeNotifierSettingsProvider() { |
38 for (size_t i = 0; i < items_.size(); ++i) { | 37 for (size_t i = 0; i < items_.size(); ++i) { |
39 delete items_[i].group; | 38 delete items_[i].group; |
40 } | 39 } |
41 } | 40 } |
42 | 41 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 118 |
120 int FakeNotifierSettingsProvider::closed_called_count() { | 119 int FakeNotifierSettingsProvider::closed_called_count() { |
121 return closed_called_count_; | 120 return closed_called_count_; |
122 } | 121 } |
123 | 122 |
124 size_t FakeNotifierSettingsProvider::settings_requested_count() const { | 123 size_t FakeNotifierSettingsProvider::settings_requested_count() const { |
125 return notifier_settings_requested_count_; | 124 return notifier_settings_requested_count_; |
126 } | 125 } |
127 | 126 |
128 } // namespace message_center | 127 } // namespace message_center |
OLD | NEW |