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

Side by Side Diff: sync/engine/syncer.cc

Issue 1991973002: [Sync] Add histograms for cookie jar state on Sessions commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 years, 7 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 (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 "sync/engine/syncer.h" 5 #include "sync/engine/syncer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 CommitProcessor* commit_processor) { 177 CommitProcessor* commit_processor) {
178 // The ExitRequested() check is unnecessary, since we should start getting 178 // The ExitRequested() check is unnecessary, since we should start getting
179 // errors from the ServerConnectionManager if an exist has been requested. 179 // errors from the ServerConnectionManager if an exist has been requested.
180 // However, it doesn't hurt to check it anyway. 180 // However, it doesn't hurt to check it anyway.
181 while (!ExitRequested()) { 181 while (!ExitRequested()) {
182 std::unique_ptr<Commit> commit(Commit::Init( 182 std::unique_ptr<Commit> commit(Commit::Init(
183 requested_types, session->context()->GetEnabledTypes(), 183 requested_types, session->context()->GetEnabledTypes(),
184 session->context()->max_commit_batch_size(), 184 session->context()->max_commit_batch_size(),
185 session->context()->account_name(), 185 session->context()->account_name(),
186 session->context()->directory()->cache_guid(), 186 session->context()->directory()->cache_guid(),
187 session->context()->cookie_jar_mismatch(), commit_processor, 187 session->context()->cookie_jar_mismatch(),
188 session->context()->cookie_jar_empty(),
189 commit_processor,
188 session->context()->extensions_activity())); 190 session->context()->extensions_activity()));
189 if (!commit) { 191 if (!commit) {
190 break; 192 break;
191 } 193 }
192 194
193 SyncerError error = commit->PostAndProcessResponse( 195 SyncerError error = commit->PostAndProcessResponse(
194 nudge_tracker, session, session->mutable_status_controller(), 196 nudge_tracker, session, session->mutable_status_controller(),
195 session->context()->extensions_activity()); 197 session->context()->extensions_activity());
196 commit->CleanUp(); 198 commit->CleanUp();
197 if (error != SYNCER_OK) { 199 if (error != SYNCER_OK) {
(...skipping 26 matching lines...) Expand all
224 } 226 }
225 227
226 bool Syncer::PostClearServerData(SyncSession* session) { 228 bool Syncer::PostClearServerData(SyncSession* session) {
227 DCHECK(session); 229 DCHECK(session);
228 ClearServerData clear_server_data(session->context()->account_name()); 230 ClearServerData clear_server_data(session->context()->account_name());
229 const SyncerError post_result = clear_server_data.SendRequest(session); 231 const SyncerError post_result = clear_server_data.SendRequest(session);
230 return post_result == SYNCER_OK; 232 return post_result == SYNCER_OK;
231 } 233 }
232 234
233 } // namespace syncer 235 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698