OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/notification_test_util.h" | 5 #include "chrome/browser/notifications/notification_test_util.h" |
6 | 6 |
7 MockNotificationDelegate::MockNotificationDelegate(const std::string& id) | 7 MockNotificationDelegate::MockNotificationDelegate(const std::string& id) |
8 : id_(id) {} | 8 : id_(id) {} |
9 | 9 |
10 MockNotificationDelegate::~MockNotificationDelegate() {} | 10 MockNotificationDelegate::~MockNotificationDelegate() {} |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 dismissed_id_ = notification_id; | 58 dismissed_id_ = notification_id; |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 std::set<std::string> | 62 std::set<std::string> |
63 StubNotificationUIManager::GetAllIdsByProfileAndSourceOrigin( | 63 StubNotificationUIManager::GetAllIdsByProfileAndSourceOrigin( |
64 Profile* profile, | 64 Profile* profile, |
65 const GURL& source) { | 65 const GURL& source) { |
66 std::set<std::string> notification_ids; | 66 std::set<std::string> notification_ids; |
67 if (source == notification_.origin_url() && profile->IsSameProfile(profile_)) | 67 if (source == notification_.origin_url() && profile->IsSameProfile(profile_)) |
68 notification_ids.insert(notification_.notification_id()); | 68 notification_ids.insert(notification_.delegate_id()); |
69 return notification_ids; | 69 return notification_ids; |
70 } | 70 } |
71 | 71 |
72 bool StubNotificationUIManager::CancelAllBySourceOrigin( | 72 bool StubNotificationUIManager::CancelAllBySourceOrigin( |
73 const GURL& source_origin) { | 73 const GURL& source_origin) { |
74 return false; | 74 return false; |
75 } | 75 } |
76 | 76 |
77 bool StubNotificationUIManager::CancelAllByProfile(Profile* profile) { | 77 bool StubNotificationUIManager::CancelAllByProfile(Profile* profile) { |
78 return false; | 78 return false; |
79 } | 79 } |
80 | 80 |
81 void StubNotificationUIManager::CancelAll() {} | 81 void StubNotificationUIManager::CancelAll() {} |
OLD | NEW |