OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 using syncer::WeakHandle; | 101 using syncer::WeakHandle; |
102 | 102 |
103 typedef GoogleServiceAuthError AuthError; | 103 typedef GoogleServiceAuthError AuthError; |
104 | 104 |
105 const char* ProfileSyncService::kSyncServerUrl = | 105 const char* ProfileSyncService::kSyncServerUrl = |
106 "https://clients4.google.com/chrome-sync"; | 106 "https://clients4.google.com/chrome-sync"; |
107 | 107 |
108 const char* ProfileSyncService::kDevServerUrl = | 108 const char* ProfileSyncService::kDevServerUrl = |
109 "https://clients4.google.com/chrome-sync/dev"; | 109 "https://clients4.google.com/chrome-sync/dev"; |
110 | 110 |
111 static const int kSyncClearDataTimeoutInSeconds = 60; // 1 minute. | 111 const char kSyncUnrecoverableErrorHistogram[] = |
112 | |
113 static const char* kSyncUnrecoverableErrorHistogram = | |
114 "Sync.UnrecoverableErrors"; | 112 "Sync.UnrecoverableErrors"; |
115 | 113 |
116 const net::BackoffEntry::Policy kRequestAccessTokenBackoffPolicy = { | 114 const net::BackoffEntry::Policy kRequestAccessTokenBackoffPolicy = { |
117 // Number of initial errors (in sequence) to ignore before applying | 115 // Number of initial errors (in sequence) to ignore before applying |
118 // exponential back-off rules. | 116 // exponential back-off rules. |
119 0, | 117 0, |
120 | 118 |
121 // Initial delay for exponential back-off in ms. | 119 // Initial delay for exponential back-off in ms. |
122 2000, | 120 2000, |
123 | 121 |
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2150 NOTREACHED(); | 2148 NOTREACHED(); |
2151 #endif | 2149 #endif |
2152 } | 2150 } |
2153 | 2151 |
2154 return signin_->GetAuthenticatedUsername(); | 2152 return signin_->GetAuthenticatedUsername(); |
2155 } | 2153 } |
2156 | 2154 |
2157 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { | 2155 WeakHandle<syncer::JsEventHandler> ProfileSyncService::GetJsEventHandler() { |
2158 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); | 2156 return MakeWeakHandle(sync_js_controller_.AsWeakPtr()); |
2159 } | 2157 } |
OLD | NEW |