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

Side by Side Diff: chrome/browser/sync/glue/local_device_info_provider.h

Issue 367153005: Sync: Refactoring of DEVICE_INFO syncable type - Part 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ExtensionSessionsTest test failures Created 6 years, 5 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_
7
8 #include <string>
9 #include "base/callback_list.h"
10
11 namespace browser_sync {
12
13 class DeviceInfo;
14
15 class LocalDeviceInfoProvider {
16 public:
17 typedef base::CallbackList<void(void)>::Subscription Subscription;
18
19 // Returns sync's representation of the local device info.
20 // Return value is an empty scoped_ptr if the device info is unavailable.
21 virtual const DeviceInfo* GetLocalDeviceInfo() const = 0;
22
23 // Used for creation of the machine tag for this local session.
24 virtual std::string GetLocalSyncCacheGUID() const = 0;
25
26 // Starts initializing local device info.
27 virtual void Initialize(const std::string& cache_guid) = 0;
28
29 // Specifies whether local device info is available
30 virtual bool IsInitialized() const = 0;
31
32 // Registers a callback to be called when local device info becomes available
33 virtual scoped_ptr<Subscription> RegisterOnInitializedCallback(
34 const base::Closure& callback) = 0;
35 };
36
37 } // namespace browser_sync
38
39 #endif // CHROME_BROWSER_SYNC_GLUE_LOCAL_DEVICE_INFO_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698