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

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: Fix destructor for compile 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSE RVER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync_file_system/sync_event_observer.h"
11
12 class Profile;
13
14 namespace extensions {
15
16 // Observes changes in SyncFileSystem and relays events to JS Extension API.
17 class ExtensionSyncEventObserver
18 : public sync_file_system::SyncEventObserver {
19 public:
20 explicit ExtensionSyncEventObserver(Profile* profile,
21 const std::string& service_name);
22 virtual ~ExtensionSyncEventObserver();
23
24 virtual void OnSyncStateUpdated(
25 const GURL& app_origin,
26 sync_file_system::SyncEventObserver::SyncServiceState state,
27 const std::string& description) OVERRIDE;
28
29 virtual void OnFileSynced(const fileapi::FileSystemURL& url,
30 fileapi::SyncOperationType operation) OVERRIDE;
31
32 private:
33 const std::string& GetExtensionId(const GURL& app_origin);
34
35 Profile* profile_;
36 const std::string service_name_;
37
38 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver);
39 };
40
41 } // namespace extensions
42
43 #endif // CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_O BSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698