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

Side by Side Diff: components/gcm_driver/fake_gcm_driver.h

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Comment out PUSH_GETREGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE Created 3 years, 10 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 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_
6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "components/gcm_driver/gcm_driver.h" 11 #include "components/gcm_driver/gcm_driver.h"
12 12
13 namespace base { 13 namespace base {
14 class SequencedTaskRunner; 14 class SequencedTaskRunner;
15 } 15 }
16 16
17 namespace gcm { 17 namespace gcm {
18 18
19 class FakeGCMDriver : public GCMDriver { 19 class FakeGCMDriver : public GCMDriver {
20 public: 20 public:
21 FakeGCMDriver(); 21 FakeGCMDriver();
22 explicit FakeGCMDriver( 22 explicit FakeGCMDriver(
23 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); 23 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner);
24 24
25 ~FakeGCMDriver() override; 25 ~FakeGCMDriver() override;
26 26
27 // GCMDriver overrides: 27 // GCMDriver overrides:
28 void ValidateRegistration(
29 const std::string& app_id,
30 const std::vector<std::string>& sender_ids,
31 const std::string& registration_id,
32 const ValidateRegistrationCallback& callback) override;
28 void OnSignedIn() override; 33 void OnSignedIn() override;
29 void OnSignedOut() override; 34 void OnSignedOut() override;
30 void AddConnectionObserver(GCMConnectionObserver* observer) override; 35 void AddConnectionObserver(GCMConnectionObserver* observer) override;
31 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; 36 void RemoveConnectionObserver(GCMConnectionObserver* observer) override;
32 void Enable() override; 37 void Enable() override;
33 void Disable() override; 38 void Disable() override;
34 GCMClient* GetGCMClientForTesting() const override; 39 GCMClient* GetGCMClientForTesting() const override;
35 bool IsStarted() const override; 40 bool IsStarted() const override;
36 bool IsConnected() const override; 41 bool IsConnected() const override;
37 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, 42 void GetGCMStatistics(const GetGCMStatisticsCallback& callback,
(...skipping 25 matching lines...) Expand all
63 GCMEncryptionProvider::DecryptionResult result) 68 GCMEncryptionProvider::DecryptionResult result)
64 override; 69 override;
65 70
66 private: 71 private:
67 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); 72 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver);
68 }; 73 };
69 74
70 } // namespace gcm 75 } // namespace gcm
71 76
72 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ 77 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698