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

Side by Side Diff: chrome/browser/services/gcm/gcm_client_mock.h

Issue 176823009: Show device information in chrome://gcm-internals page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code comments. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SERVICES_GCM_GCM_CLIENT_MOCK_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_
6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "google_apis/gcm/gcm_client.h" 10 #include "google_apis/gcm/gcm_client.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 Delegate* delegate) OVERRIDE; 46 Delegate* delegate) OVERRIDE;
47 virtual void Load() OVERRIDE; 47 virtual void Load() OVERRIDE;
48 virtual void CheckOut() OVERRIDE; 48 virtual void CheckOut() OVERRIDE;
49 virtual void Register(const std::string& app_id, 49 virtual void Register(const std::string& app_id,
50 const std::string& cert, 50 const std::string& cert,
51 const std::vector<std::string>& sender_ids) OVERRIDE; 51 const std::vector<std::string>& sender_ids) OVERRIDE;
52 virtual void Unregister(const std::string& app_id) OVERRIDE; 52 virtual void Unregister(const std::string& app_id) OVERRIDE;
53 virtual void Send(const std::string& app_id, 53 virtual void Send(const std::string& app_id,
54 const std::string& receiver_id, 54 const std::string& receiver_id,
55 const OutgoingMessage& message) OVERRIDE; 55 const OutgoingMessage& message) OVERRIDE;
56 virtual GCMStatistics GetStatistics() const OVERRIDE;
56 57
57 // Initiate the loading that has been delayed. 58 // Initiate the loading that has been delayed.
58 // Called on UI thread. 59 // Called on UI thread.
59 void PerformDelayedLoading(); 60 void PerformDelayedLoading();
60 61
61 // Simulate receiving something from the server. 62 // Simulate receiving something from the server.
62 // Called on UI thread. 63 // Called on UI thread.
63 void ReceiveMessage(const std::string& app_id, 64 void ReceiveMessage(const std::string& app_id,
64 const IncomingMessage& message); 65 const IncomingMessage& message);
65 void DeleteMessages(const std::string& app_id); 66 void DeleteMessages(const std::string& app_id);
(...skipping 21 matching lines...) Expand all
87 LoadingDelay loading_delay_; 88 LoadingDelay loading_delay_;
88 ErrorSimulation error_simulation_; 89 ErrorSimulation error_simulation_;
89 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_; 90 base::WeakPtrFactory<GCMClientMock> weak_ptr_factory_;
90 91
91 DISALLOW_COPY_AND_ASSIGN(GCMClientMock); 92 DISALLOW_COPY_AND_ASSIGN(GCMClientMock);
92 }; 93 };
93 94
94 } // namespace gcm 95 } // namespace gcm
95 96
96 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_ 97 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_CLIENT_MOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698