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

Side by Side Diff: chrome/browser/notifications/notification_test_util.cc

Issue 344763002: Rename notification_id() to disambiguate its meaning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 6 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
« no previous file with comments | « chrome/browser/notifications/notification.h ('k') | ui/message_center/notification.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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() {}
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification.h ('k') | ui/message_center/notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698