| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSE
RVER_H_ | 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_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_OBSE
RVER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/sync_file_system/sync_event_observer.h" | 12 #include "chrome/browser/sync_file_system/sync_event_observer.h" |
| 13 #include "extensions/browser/browser_context_keyed_api_factory.h" | 13 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 14 #include "extensions/browser/extension_event_histogram_value.h" |
| 14 | 15 |
| 15 namespace content { | 16 namespace content { |
| 16 class BrowserContext; | 17 class BrowserContext; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace sync_file_system { | 20 namespace sync_file_system { |
| 20 class SyncFileSystemService; | 21 class SyncFileSystemService; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace extensions { | 24 namespace extensions { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // BrowserContextKeyedAPI implementation. | 60 // BrowserContextKeyedAPI implementation. |
| 60 static const char* service_name() { return "ExtensionSyncEventObserver"; } | 61 static const char* service_name() { return "ExtensionSyncEventObserver"; } |
| 61 static const bool kServiceIsCreatedWithBrowserContext = false; | 62 static const bool kServiceIsCreatedWithBrowserContext = false; |
| 62 | 63 |
| 63 content::BrowserContext* browser_context_; | 64 content::BrowserContext* browser_context_; |
| 64 | 65 |
| 65 // Not owned. If not null, then this is registered to SyncFileSystemService. | 66 // Not owned. If not null, then this is registered to SyncFileSystemService. |
| 66 sync_file_system::SyncFileSystemService* sync_service_; | 67 sync_file_system::SyncFileSystemService* sync_service_; |
| 67 | 68 |
| 68 void BroadcastOrDispatchEvent(const GURL& app_origin, | 69 void BroadcastOrDispatchEvent(const GURL& app_origin, |
| 70 events::HistogramValue histogram_value, |
| 69 const std::string& event_name, | 71 const std::string& event_name, |
| 70 scoped_ptr<base::ListValue> value); | 72 scoped_ptr<base::ListValue> value); |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver); | 74 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncEventObserver); |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 template <> | 77 template <> |
| 76 void BrowserContextKeyedAPIFactory< | 78 void BrowserContextKeyedAPIFactory< |
| 77 ExtensionSyncEventObserver>::DeclareFactoryDependencies(); | 79 ExtensionSyncEventObserver>::DeclareFactoryDependencies(); |
| 78 | 80 |
| 79 } // namespace extensions | 81 } // namespace extensions |
| 80 | 82 |
| 81 #endif // CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_O
BSERVER_H_ | 83 #endif // CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_EXTENSION_SYNC_EVENT_O
BSERVER_H_ |
| OLD | NEW |