OLD | NEW |
---|---|
(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/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 // Handles sending JavaScript events to exactly one extension ID. | |
kinuko
2012/11/28 11:06:40
nit: 'exactly one' may not be correct if we get br
calvinlo
2012/11/28 12:26:34
Sorry forgot to update this. You are correct as th
| |
17 class ExtensionSyncEventObserver | |
18 : public sync_file_system::SyncEventObserver { | |
19 public: | |
20 ExtensionSyncEventObserver(Profile* profile, | |
21 const std::string& service_name); | |
22 ~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(fileapi::SyncOperationType operation, | |
30 const fileapi::FileSystemURL& url) OVERRIDE; | |
31 | |
32 private: | |
33 Profile* profile_; | |
34 const std::string service_name_; | |
35 | |
36 const std::string GetExtensionId(const GURL& app_origin); | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver); | |
39 }; | |
40 | |
41 } // namespace extensions | |
42 | |
43 #endif // #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC _EVENT_OBSERVER_ | |
OLD | NEW |