diff options
| author | jkarlin <jkarlin@chromium.org> | 2015-10-06 08:13:35 -0700 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-10-06 15:14:39 +0000 |
| commit | 6f5078ed47fa34af63cec4139db3347bcb74ecb4 (patch) | |
| tree | 55a05742fe85dff9300f051f8448483148993b12 /chrome/browser/profiles | |
| parent | 75a0abfba2569e38b0d8cd6bfd6a7f135d2fffe2 (diff) | |
| download | chromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.zip chromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.tar.gz chromium_src-6f5078ed47fa34af63cec4139db3347bcb74ecb4.tar.bz2 | |
[BackgroundSync] Add BackgroundSyncController to Chrome
The new BackgroundSyncController allows content::BackgroundSyncManager to access Chrome features like Rappor and, in a followup CL, the BackgroundSyncLauncher.
BUG=538640
Review URL: https://codereview.chromium.org/1369823003
Cr-Commit-Position: refs/heads/master@{#352605}
Diffstat (limited to 'chrome/browser/profiles')
| -rw-r--r-- | chrome/browser/profiles/off_the_record_profile_impl.cc | 7 | ||||
| -rw-r--r-- | chrome/browser/profiles/off_the_record_profile_impl.h | 1 | ||||
| -rw-r--r-- | chrome/browser/profiles/profile_impl.cc | 6 | ||||
| -rw-r--r-- | chrome/browser/profiles/profile_impl.h | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc index 3560021..0cb75f4 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl.cc +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc @@ -14,6 +14,8 @@ #include "base/strings/string_util.h" #include "build/build_config.h" #include "chrome/browser/background/background_contents_service_factory.h" +#include "chrome/browser/background_sync/background_sync_controller_factory.h" +#include "chrome/browser/background_sync/background_sync_controller_impl.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/dom_distiller/profile_utils.h" @@ -408,6 +410,11 @@ content::PermissionManager* OffTheRecordProfileImpl::GetPermissionManager() { return PermissionManagerFactory::GetForProfile(this); } +content::BackgroundSyncController* +OffTheRecordProfileImpl::GetBackgroundSyncController() { + return BackgroundSyncControllerFactory::GetForProfile(this); +} + bool OffTheRecordProfileImpl::IsSameProfile(Profile* profile) { return (profile == this) || (profile == profile_); } diff --git a/chrome/browser/profiles/off_the_record_profile_impl.h b/chrome/browser/profiles/off_the_record_profile_impl.h index 54b9224..17e2a0c 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl.h +++ b/chrome/browser/profiles/off_the_record_profile_impl.h @@ -106,6 +106,7 @@ class OffTheRecordProfileImpl : public Profile { content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; content::PermissionManager* GetPermissionManager() override; + content::BackgroundSyncController* GetBackgroundSyncController() override; private: void InitIoData(); diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 5c8bc99..5c659b6 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -29,6 +29,8 @@ #include "base/trace_event/trace_event.h" #include "base/version.h" #include "chrome/browser/background/background_contents_service_factory.h" +#include "chrome/browser/background_sync/background_sync_controller_factory.h" +#include "chrome/browser/background_sync/background_sync_controller_impl.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_notification_types.h" @@ -1024,6 +1026,10 @@ content::PermissionManager* ProfileImpl::GetPermissionManager() { return PermissionManagerFactory::GetForProfile(this); } +content::BackgroundSyncController* ProfileImpl::GetBackgroundSyncController() { + return BackgroundSyncControllerFactory::GetForProfile(this); +} + bool ProfileImpl::IsSameProfile(Profile* profile) { if (profile == static_cast<Profile*>(this)) return true; diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h index 89b98ab..b53f6f6 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h @@ -93,6 +93,7 @@ class ProfileImpl : public Profile { content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; content::PermissionManager* GetPermissionManager() override; + content::BackgroundSyncController* GetBackgroundSyncController() override; // Profile implementation: scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; |
