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

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

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 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 | Annotate | Revision Log
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/all_status.h" 5 #include "sync/engine/all_status.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/port.h" 10 #include "base/port.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void AllStatus::OnSyncEngineEvent(const SyncEngineEvent& event) { 99 void AllStatus::OnSyncEngineEvent(const SyncEngineEvent& event) {
100 ScopedStatusLock lock(this); 100 ScopedStatusLock lock(this);
101 switch (event.what_happened) { 101 switch (event.what_happened) {
102 case SyncEngineEvent::SYNC_CYCLE_BEGIN: 102 case SyncEngineEvent::SYNC_CYCLE_BEGIN:
103 case SyncEngineEvent::STATUS_CHANGED: 103 case SyncEngineEvent::STATUS_CHANGED:
104 case SyncEngineEvent::SYNC_CYCLE_ENDED: 104 case SyncEngineEvent::SYNC_CYCLE_ENDED:
105 status_ = CalcSyncing(event); 105 status_ = CalcSyncing(event);
106 break; 106 break;
107 case SyncEngineEvent::STOP_SYNCING_PERMANENTLY: 107 case SyncEngineEvent::STOP_SYNCING_PERMANENTLY:
108 case SyncEngineEvent::UPDATED_TOKEN: 108 case SyncEngineEvent::UPDATED_TOKEN:
109 case SyncEngineEvent::CLEAR_SERVER_DATA_FAILED:
110 case SyncEngineEvent::CLEAR_SERVER_DATA_SUCCEEDED:
111 break; 109 break;
112 case SyncEngineEvent::ACTIONABLE_ERROR: 110 case SyncEngineEvent::ACTIONABLE_ERROR:
113 status_ = CreateBlankStatus(); 111 status_ = CreateBlankStatus();
114 status_.sync_protocol_error = event.snapshot.errors().sync_protocol_error; 112 status_.sync_protocol_error = event.snapshot.errors().sync_protocol_error;
115 break; 113 break;
116 default: 114 default:
117 LOG(ERROR) << "Unrecognized Syncer Event: " << event.what_happened; 115 LOG(ERROR) << "Unrecognized Syncer Event: " << event.what_happened;
118 break; 116 break;
119 } 117 }
120 } 118 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) 160 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
163 : allstatus_(allstatus) { 161 : allstatus_(allstatus) {
164 allstatus->mutex_.Acquire(); 162 allstatus->mutex_.Acquire();
165 } 163 }
166 164
167 ScopedStatusLock::~ScopedStatusLock() { 165 ScopedStatusLock::~ScopedStatusLock() {
168 allstatus_->mutex_.Release(); 166 allstatus_->mutex_.Release();
169 } 167 }
170 168
171 } // namespace browser_sync 169 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_startup_unittest.cc ('k') | sync/engine/clear_data_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698