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

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

Issue 8585037: Revert the revert. This change was not the cause of the failures, so relanding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/engine/all_status.h" 5 #include "chrome/browser/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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void AllStatus::SetCryptographerReady(bool ready) { 181 void AllStatus::SetCryptographerReady(bool ready) {
182 ScopedStatusLock lock(this); 182 ScopedStatusLock lock(this);
183 status_.cryptographer_ready = ready; 183 status_.cryptographer_ready = ready;
184 } 184 }
185 185
186 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) { 186 void AllStatus::SetCryptoHasPendingKeys(bool has_pending_keys) {
187 ScopedStatusLock lock(this); 187 ScopedStatusLock lock(this);
188 status_.crypto_has_pending_keys = has_pending_keys; 188 status_.crypto_has_pending_keys = has_pending_keys;
189 } 189 }
190 190
191 void AllStatus::SetUniqueId(const std::string& guid) {
192 ScopedStatusLock lock(this);
193 status_.unique_id = guid;
194 }
195
191 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) 196 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
192 : allstatus_(allstatus) { 197 : allstatus_(allstatus) {
193 allstatus->mutex_.Acquire(); 198 allstatus->mutex_.Acquire();
194 } 199 }
195 200
196 ScopedStatusLock::~ScopedStatusLock() { 201 ScopedStatusLock::~ScopedStatusLock() {
197 allstatus_->CalcStatusChanges(); 202 allstatus_->CalcStatusChanges();
198 allstatus_->mutex_.Release(); 203 allstatus_->mutex_.Release();
199 } 204 }
200 205
201 } // namespace browser_sync 206 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/internal_api/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698