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

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: Created 8 years, 1 month 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
9 #include "chrome/browser/extensions/event_router.h"
kinuko 2012/11/21 10:59:04 Not necessary (yet)?
calvinlo 2012/11/28 06:01:45 You're right. I've added a forward declaration of
10 #include "chrome/browser/sync_file_system/sync_event_observer.h"
11
12 namespace extensions {
13
14 // Handles sending JavaScript events to exactly one extension ID
kinuko 2012/11/21 10:59:04 nit: '.' at the end of comment
calvinlo 2012/11/28 06:01:45 Done.
15 class ExtensionSyncEventObserver
16 : public sync_file_system::SyncEventObserver {
17 public:
18 ExtensionSyncEventObserver(std::string extension_id, Profile* profile);
kinuko 2012/11/21 10:59:04 nit: use const reference for extension_id (to save
calvinlo 2012/11/28 06:01:45 Done.
19 ~ExtensionSyncEventObserver();
20
21 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver);
kinuko 2012/11/21 10:59:04 This needs to be placed in private: (Usually we wr
calvinlo 2012/11/28 06:01:45 Done.
22
23 virtual void OnSyncStateUpdated(
24 sync_file_system::SyncEventObserver::SyncServiceState state,
25 const std::string& description) OVERRIDE;
26
27 private:
28 std::string extension_id_;
29 Profile* profile_;
30 };
31
32 } // namespace extensions
kinuko 2012/11/21 10:59:04 nit: extra space after '//'?
calvinlo 2012/11/28 06:01:45 Done.
33
34 #endif // #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC _EVENT_OBSERVER_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698