OLD | NEW |
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/base64.h" | 5 #include "base/base64.h" |
6 #include "base/i18n/time_formatting.h" | 6 #include "base/i18n/time_formatting.h" |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/sha1.h" | 8 #include "base/sha1.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #if !defined(OS_ANDROID) | 11 #if !defined(OS_ANDROID) |
12 // channel_common.proto defines ANDROID constant that conflicts with Android | 12 // channel_common.proto defines ANDROID constant that conflicts with Android |
13 // build. At the same time TiclInvalidationService is not used on Android so it | 13 // build. At the same time TiclInvalidationService is not used on Android so it |
14 // is safe to exclude these protos from Android build. | 14 // is safe to exclude these protos from Android build. |
15 #include "google/cacheinvalidation/android_channel.pb.h" | 15 #include "google/cacheinvalidation/android_channel.pb.h" |
16 #include "google/cacheinvalidation/channel_common.pb.h" | 16 #include "google/cacheinvalidation/channel_common.pb.h" |
17 #include "google/cacheinvalidation/types.pb.h" | 17 #include "google/cacheinvalidation/types.pb.h" |
18 #endif | 18 #endif |
| 19 #include "components/invalidation/gcm_network_channel.h" |
| 20 #include "components/invalidation/gcm_network_channel_delegate.h" |
19 #include "google_apis/gaia/google_service_auth_error.h" | 21 #include "google_apis/gaia/google_service_auth_error.h" |
20 #include "net/http/http_status_code.h" | 22 #include "net/http/http_status_code.h" |
21 #include "net/url_request/url_fetcher.h" | 23 #include "net/url_request/url_fetcher.h" |
22 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" |
23 #include "sync/notifier/gcm_network_channel.h" | |
24 #include "sync/notifier/gcm_network_channel_delegate.h" | |
25 | 25 |
26 namespace syncer { | 26 namespace syncer { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const char kCacheInvalidationEndpointUrl[] = | 30 const char kCacheInvalidationEndpointUrl[] = |
31 "https://clients4.google.com/invalidation/android/request/"; | 31 "https://clients4.google.com/invalidation/android/request/"; |
32 const char kCacheInvalidationPackageName[] = "com.google.chrome.invalidations"; | 32 const char kCacheInvalidationPackageName[] = "com.google.chrome.invalidations"; |
33 | 33 |
34 // Register backoff policy. | 34 // Register backoff policy. |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 ENUM_CASE(gcm::GCMClient::NOT_SIGNED_IN); | 421 ENUM_CASE(gcm::GCMClient::NOT_SIGNED_IN); |
422 ENUM_CASE(gcm::GCMClient::INVALID_PARAMETER); | 422 ENUM_CASE(gcm::GCMClient::INVALID_PARAMETER); |
423 ENUM_CASE(gcm::GCMClient::ASYNC_OPERATION_PENDING); | 423 ENUM_CASE(gcm::GCMClient::ASYNC_OPERATION_PENDING); |
424 ENUM_CASE(gcm::GCMClient::GCM_DISABLED); | 424 ENUM_CASE(gcm::GCMClient::GCM_DISABLED); |
425 } | 425 } |
426 NOTREACHED(); | 426 NOTREACHED(); |
427 return ""; | 427 return ""; |
428 } | 428 } |
429 | 429 |
430 } // namespace syncer | 430 } // namespace syncer |
OLD | NEW |