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

Side by Side Diff: components/invalidation/gcm_network_channel.h

Issue 334253006: Notify SyncNetworkChannel about GCM connection state (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
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_INVALIDATION_GCM_NETWORK_CHANNEL_H_ 5 #ifndef COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_
6 #define COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_ 6 #define COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 private: 86 private:
87 friend class GCMNetworkChannelTest; 87 friend class GCMNetworkChannelTest;
88 void Register(); 88 void Register();
89 void OnRegisterComplete(const std::string& registration_id, 89 void OnRegisterComplete(const std::string& registration_id,
90 gcm::GCMClient::Result result); 90 gcm::GCMClient::Result result);
91 void RequestAccessToken(); 91 void RequestAccessToken();
92 void OnGetTokenComplete(const GoogleServiceAuthError& error, 92 void OnGetTokenComplete(const GoogleServiceAuthError& error,
93 const std::string& token); 93 const std::string& token);
94 void OnIncomingMessage(const std::string& message, 94 void OnIncomingMessage(const std::string& message,
95 const std::string& echo_token); 95 const std::string& echo_token);
96 void OnConnectionStateChanged(
97 GCMNetworkChannelDelegate::ConnectionState conneciton_state);
rlarocque 2014/06/18 16:55:25 typo: conneciton_state
pavely 2014/06/18 17:16:08 Done.
96 98
97 // Base64 encoding/decoding with URL safe alphabet. 99 // Base64 encoding/decoding with URL safe alphabet.
98 // http://tools.ietf.org/html/rfc4648#page-7 100 // http://tools.ietf.org/html/rfc4648#page-7
99 static void Base64EncodeURLSafe(const std::string& input, 101 static void Base64EncodeURLSafe(const std::string& input,
100 std::string* output); 102 std::string* output);
101 static bool Base64DecodeURLSafe(const std::string& input, 103 static bool Base64DecodeURLSafe(const std::string& input,
102 std::string* output); 104 std::string* output);
103 105
104 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 106 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
105 scoped_ptr<GCMNetworkChannelDelegate> delegate_; 107 scoped_ptr<GCMNetworkChannelDelegate> delegate_;
(...skipping 20 matching lines...) Expand all
126 GCMNetworkChannelDiagnostic diagnostic_info_; 128 GCMNetworkChannelDiagnostic diagnostic_info_;
127 129
128 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_; 130 base::WeakPtrFactory<GCMNetworkChannel> weak_factory_;
129 131
130 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel); 132 DISALLOW_COPY_AND_ASSIGN(GCMNetworkChannel);
131 }; 133 };
132 134
133 } // namespace syncer 135 } // namespace syncer
134 136
135 #endif // COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_ 137 #endif // COMPONENTS_INVALIDATION_GCM_NETWORK_CHANNEL_H_
OLDNEW
« no previous file with comments | « components/invalidation/gcm_invalidation_bridge.cc ('k') | components/invalidation/gcm_network_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698