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

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

Issue 993343006: [CleanUp] Remove parameter |by_user| in NotificationClosed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "base/threading/platform_thread.h" 6 #include "base/threading/platform_thread.h"
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "chrome/browser/notifications/notification_test_util.h" 8 #include "chrome/browser/notifications/notification_test_util.h"
9 #include "chrome/browser/notifications/platform_notification_service_impl.h" 9 #include "chrome/browser/notifications/platform_notification_service_impl.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 10 matching lines...) Expand all
21 : public content::DesktopNotificationDelegate { 21 : public content::DesktopNotificationDelegate {
22 public: 22 public:
23 MockDesktopNotificationDelegate() 23 MockDesktopNotificationDelegate()
24 : displayed_(false), 24 : displayed_(false),
25 clicked_(false) {} 25 clicked_(false) {}
26 26
27 ~MockDesktopNotificationDelegate() override {} 27 ~MockDesktopNotificationDelegate() override {}
28 28
29 // content::DesktopNotificationDelegate implementation. 29 // content::DesktopNotificationDelegate implementation.
30 void NotificationDisplayed() override { displayed_ = true; } 30 void NotificationDisplayed() override { displayed_ = true; }
31 void NotificationClosed(bool by_user) override {} 31 void NotificationClosed() override {}
32 void NotificationClick() override { clicked_ = true; } 32 void NotificationClick() override { clicked_ = true; }
33 33
34 bool displayed() const { return displayed_; } 34 bool displayed() const { return displayed_; }
35 bool clicked() const { return clicked_; } 35 bool clicked() const { return clicked_; }
36 36
37 private: 37 private:
38 bool displayed_; 38 bool displayed_;
39 bool clicked_; 39 bool clicked_;
40 }; 40 };
41 41
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 service()->DisplayPersistentNotification( 245 service()->DisplayPersistentNotification(
246 profile(), 42 /* sw_registration_id */, origin, SkBitmap(), 246 profile(), 42 /* sw_registration_id */, origin, SkBitmap(),
247 content::PlatformNotificationData()); 247 content::PlatformNotificationData());
248 248
249 base::Time after_persistent_notification = 249 base::Time after_persistent_notification =
250 profile()->GetHostContentSettingsMap()->GetLastUsage( 250 profile()->GetHostContentSettingsMap()->GetLastUsage(
251 origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 251 origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
252 EXPECT_GT(after_persistent_notification, after_page_notification); 252 EXPECT_GT(after_persistent_notification, after_page_notification);
253 } 253 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_object_proxy.cc ('k') | content/browser/notifications/page_notification_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698