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

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

Issue 1155453002: Passing ProfileID instead of Profile* to clarify that profile should not be used for making any cal… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 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
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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void SetNotificationAddedCallback(const base::Closure& callback); 49 void SetNotificationAddedCallback(const base::Closure& callback);
50 50
51 // NotificationUIManager implementation. 51 // NotificationUIManager implementation.
52 void Add(const Notification& notification, Profile* profile) override; 52 void Add(const Notification& notification, Profile* profile) override;
53 bool Update(const Notification& notification, Profile* profile) override; 53 bool Update(const Notification& notification, Profile* profile) override;
54 const Notification* FindById(const std::string& delegate_id, 54 const Notification* FindById(const std::string& delegate_id,
55 ProfileID profile_id) const override; 55 ProfileID profile_id) const override;
56 bool CancelById(const std::string& delegate_id, 56 bool CancelById(const std::string& delegate_id,
57 ProfileID profile_id) override; 57 ProfileID profile_id) override;
58 std::set<std::string> GetAllIdsByProfileAndSourceOrigin( 58 std::set<std::string> GetAllIdsByProfileAndSourceOrigin(
59 Profile* profile, 59 ProfileID profile_id,
60 const GURL& source) override; 60 const GURL& source) override;
61 std::set<std::string> GetAllIdsByProfile(Profile* profile) override; 61 std::set<std::string> GetAllIdsByProfile(ProfileID profile_id) override;
62 bool CancelAllBySourceOrigin(const GURL& source_origin) override; 62 bool CancelAllBySourceOrigin(const GURL& source_origin) override;
63 bool CancelAllByProfile(ProfileID profile_id) override; 63 bool CancelAllByProfile(ProfileID profile_id) override;
64 void CancelAll() override; 64 void CancelAll() override;
65 65
66 private: 66 private:
67 using NotificationPair = std::pair<Notification, ProfileID>; 67 using NotificationPair = std::pair<Notification, ProfileID>;
68 std::vector<NotificationPair> notifications_; 68 std::vector<NotificationPair> notifications_;
69 69
70 base::Closure notification_added_callback_; 70 base::Closure notification_added_callback_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager); 72 DISALLOW_COPY_AND_ASSIGN(StubNotificationUIManager);
73 }; 73 };
74 74
75 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ 75 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698