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

Side by Side Diff: ui/message_center/fake_notifier_settings_provider.cc

Issue 20066003: Update notification settings to allow for multiprofile situations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: And remove unneeded include. Created 7 years, 4 months 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 | Annotate | Revision Log
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 "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"
8 #include "ui/gfx/image/image.h"
9
7 namespace message_center { 10 namespace message_center {
8 11
9 FakeNotifierSettingsProvider::FakeNotifierSettingsProvider( 12 FakeNotifierSettingsProvider::FakeNotifierSettingsProvider(
10 const std::vector<Notifier*>& notifiers) 13 const std::vector<Notifier*>& notifiers)
11 : notifiers_(notifiers), closed_called_count_(0) {} 14 : notifiers_(notifiers),
15 notifier_group_(gfx::Image(),
16 UTF8ToUTF16("Fake name"),
17 UTF8ToUTF16("fake@email.com"),
18 true),
19 closed_called_count_(0) {}
12 20
13 FakeNotifierSettingsProvider::~FakeNotifierSettingsProvider() {} 21 FakeNotifierSettingsProvider::~FakeNotifierSettingsProvider() {}
14 22
23 size_t FakeNotifierSettingsProvider::GetNotifierGroupCount() const { return 1; }
24
25 const message_center::NotifierGroup&
26 FakeNotifierSettingsProvider::GetNotifierGroupAt(size_t index) const {
27 return notifier_group_;
28 }
29
30 void FakeNotifierSettingsProvider::SwitchToNotifierGroup(size_t index) {}
31
32 const message_center::NotifierGroup&
33 FakeNotifierSettingsProvider::GetActiveNotifierGroup() const {
34 return notifier_group_;
35 }
36
15 void FakeNotifierSettingsProvider::GetNotifierList( 37 void FakeNotifierSettingsProvider::GetNotifierList(
16 std::vector<Notifier*>* notifiers) { 38 std::vector<Notifier*>* notifiers) {
17 notifiers->clear(); 39 notifiers->clear();
18 for (size_t i = 0; i < notifiers_.size(); ++i) 40 for (size_t i = 0; i < notifiers_.size(); ++i)
19 notifiers->push_back(notifiers_[i]); 41 notifiers->push_back(notifiers_[i]);
20 } 42 }
21 43
22 void FakeNotifierSettingsProvider::SetNotifierEnabled(const Notifier& notifier, 44 void FakeNotifierSettingsProvider::SetNotifierEnabled(const Notifier& notifier,
23 bool enabled) { 45 bool enabled) {
24 enabled_[&notifier] = enabled; 46 enabled_[&notifier] = enabled;
(...skipping 13 matching lines...) Expand all
38 60
39 bool FakeNotifierSettingsProvider::WasEnabled(const Notifier& notifier) { 61 bool FakeNotifierSettingsProvider::WasEnabled(const Notifier& notifier) {
40 return enabled_[&notifier]; 62 return enabled_[&notifier];
41 } 63 }
42 64
43 int FakeNotifierSettingsProvider::closed_called_count() { 65 int FakeNotifierSettingsProvider::closed_called_count() {
44 return closed_called_count_; 66 return closed_called_count_;
45 } 67 }
46 68
47 } // namespace message_center 69 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/fake_notifier_settings_provider.h ('k') | ui/message_center/message_center.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698