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

Side by Side Diff: chrome/browser/sync/profile_sync_service.h

Issue 224563004: sync: Re-implement getAllNodes WebUI function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix Created 6 years, 8 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 virtual void RemoveObserver( 269 virtual void RemoveObserver(
270 ProfileSyncServiceBase::Observer* observer) OVERRIDE; 270 ProfileSyncServiceBase::Observer* observer) OVERRIDE;
271 virtual bool HasObserver( 271 virtual bool HasObserver(
272 ProfileSyncServiceBase::Observer* observer) const OVERRIDE; 272 ProfileSyncServiceBase::Observer* observer) const OVERRIDE;
273 273
274 274
275 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); 275 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer);
276 void RemoveProtocolEventObserver( 276 void RemoveProtocolEventObserver(
277 browser_sync::ProtocolEventObserver* observer); 277 browser_sync::ProtocolEventObserver* observer);
278 278
279 // Asynchronously fetches base::Value representations of all sync nodes and
280 // returns them to the specified callback on this thread.
281 //
282 // These requests can live a long time and return when you least expect it.
283 // For safety, the callback should be bound to some sort of WeakPtr<> or
284 // scoped_refptr<>.
285 void GetAllNodes(
286 const base::Callback<void(scoped_ptr<base::ListValue>)>& callback);
287
279 void RegisterAuthNotifications(); 288 void RegisterAuthNotifications();
280 void UnregisterAuthNotifications(); 289 void UnregisterAuthNotifications();
281 290
282 // Returns true if sync is enabled/not suppressed and the user is logged in. 291 // Returns true if sync is enabled/not suppressed and the user is logged in.
283 // (being logged in does not mean that tokens are available - tokens may 292 // (being logged in does not mean that tokens are available - tokens may
284 // be missing because they have not loaded yet, or because they were deleted 293 // be missing because they have not loaded yet, or because they were deleted
285 // due to http://crbug.com/121755). 294 // due to http://crbug.com/121755).
286 // Virtual to enable mocking in tests. 295 // Virtual to enable mocking in tests.
287 // TODO(tim): Remove this? Nothing in ProfileSyncService uses it, and outside 296 // TODO(tim): Remove this? Nothing in ProfileSyncService uses it, and outside
288 // callers use a seemingly arbitrary / redundant / bug prone combination of 297 // callers use a seemingly arbitrary / redundant / bug prone combination of
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 browser_sync::StartupController startup_controller_; 1023 browser_sync::StartupController startup_controller_;
1015 1024
1016 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 1025 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
1017 }; 1026 };
1018 1027
1019 bool ShouldShowActionOnUI( 1028 bool ShouldShowActionOnUI(
1020 const syncer::SyncProtocolError& error); 1029 const syncer::SyncProtocolError& error);
1021 1030
1022 1031
1023 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 1032 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_mock.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698