| Index: google_apis/gcm/engine/gcm_registration_request.h
|
| diff --git a/google_apis/gcm/engine/gcm_registration_request.h b/google_apis/gcm/engine/gcm_registration_request.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..563683124c27ff9374b01824c63678e564fb9f0a
|
| --- /dev/null
|
| +++ b/google_apis/gcm/engine/gcm_registration_request.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_H_
|
| +#define GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_H_
|
| +
|
| +#include "google_apis/gcm/engine/registration_request.h"
|
| +
|
| +namespace gcm {
|
| +
|
| +// Used to obtain the registration ID for applications that want to use GCM.
|
| +class GCM_EXPORT GCMRegistrationRequest : public RegistrationRequest {
|
| + public:
|
| + // Additional info for GCM registration requests.
|
| + struct GCM_EXPORT ExtraRequestInfo {
|
| + ExtraRequestInfo(const std::vector<std::string>& sender_ids);
|
| + ~ExtraRequestInfo();
|
| +
|
| + // List of IDs of senders. Allowed up to 100.
|
| + std::vector<std::string> sender_ids;
|
| + };
|
| +
|
| + GCMRegistrationRequest(
|
| + const GURL& registration_url,
|
| + const RequestInfo& request_info,
|
| + const ExtraRequestInfo& extra_request_info,
|
| + const net::BackoffEntry::Policy& backoff_policy,
|
| + const RegistrationCallback& callback,
|
| + int max_retry_count,
|
| + scoped_refptr<net::URLRequestContextGetter> request_context_getter,
|
| + GCMStatsRecorder* recorder);
|
| + ~GCMRegistrationRequest() override;
|
| +
|
| + // RegistrationRequest overrides:
|
| + void BuildRequestBody(std::string* body) override;
|
| + std::string GetSourceForRecorder() const override;
|
| +
|
| + private:
|
| + ExtraRequestInfo extra_request_info_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(GCMRegistrationRequest);
|
| +};
|
| +
|
| +} // namespace gcm
|
| +
|
| +#endif // GOOGLE_APIS_GCM_ENGINE_GCM_REGISTRATION_REQUEST_H_
|
|
|