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

Side by Side Diff: chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h

Issue 11316133: Added implementation of SyncEventObserver to route events to Javascript Extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed test to match updated SyncEventObserver interface Created 8 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSE RVER_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSE RVER_
7
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/sync_file_system/sync_event_observer.h"
10
11 class Profile;
12
13 namespace extensions {
14
15 // Handles sending JavaScript events to exactly one extension ID.
16 class ExtensionSyncEventObserver
17 : public sync_file_system::SyncEventObserver {
18 public:
19 ExtensionSyncEventObserver(Profile* profile,
20 const std::string& service_name);
21 ~ExtensionSyncEventObserver();
22
23 virtual void OnSyncStateUpdated(
24 const std::string& extension_id,
25 sync_file_system::SyncEventObserver::SyncServiceState state,
26 const std::string& description) OVERRIDE;
kinuko 2012/11/28 07:41:13 You'll also need to have OnFileSynced() override h
calvinlo 2012/11/28 10:43:46 Ok I've added this now but just using a DOMString
27
28 private:
29 Profile* profile_;
30 const std::string service_name_;
31
32 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver);
33 };
34
35 } // namespace extensions
36
37 #endif // #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC _EVENT_OBSERVER_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698