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

Side by Side Diff: components/sync/engine_impl/all_status.cc

Issue 2619763002: Expose local sync mode status in the chrome://sync-internals page. (Closed)
Patch Set: Created 3 years, 11 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 "components/sync/engine_impl/all_status.h" 5 #include "components/sync/engine_impl/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 "components/sync/engine_impl/net/server_connection_manager.h" 10 #include "components/sync/engine_impl/net/server_connection_manager.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 status_.nudge_source_notification++; 178 status_.nudge_source_notification++;
179 return; 179 return;
180 case NUDGE_SOURCE_UNKNOWN: 180 case NUDGE_SOURCE_UNKNOWN:
181 break; 181 break;
182 } 182 }
183 // If we're here, the source is most likely 183 // If we're here, the source is most likely
184 // NUDGE_SOURCE_UNKNOWN. That shouldn't happen. 184 // NUDGE_SOURCE_UNKNOWN. That shouldn't happen.
185 NOTREACHED(); 185 NOTREACHED();
186 } 186 }
187 187
188 void AllStatus::SetLocalBackendFolder(const std::string& folder) {
189 ScopedStatusLock lock(this);
190 status_.local_sync_folder = folder;
191 }
192
188 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) 193 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
189 : allstatus_(allstatus) { 194 : allstatus_(allstatus) {
190 allstatus->mutex_.Acquire(); 195 allstatus->mutex_.Acquire();
191 } 196 }
192 197
193 ScopedStatusLock::~ScopedStatusLock() { 198 ScopedStatusLock::~ScopedStatusLock() {
194 allstatus_->mutex_.Release(); 199 allstatus_->mutex_.Release();
195 } 200 }
196 201
197 } // namespace syncer 202 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/all_status.h ('k') | components/sync/engine_impl/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698