| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/sync/test/integration/sync_extension_installer.h" | 5 #include "chrome/browser/sync/test/integration/sync_extension_installer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 12 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 13 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" | 13 #include "chrome/browser/sync/test/integration/sync_extension_helper.h" |
| 14 #include "chrome/browser/sync/test/integration/sync_test.h" | 14 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 15 #include "content/public/browser/notification_source.h" | 15 #include "content/public/browser/notification_source.h" |
| 16 | 16 |
| 17 SyncedExtensionInstaller::SyncedExtensionInstaller(Profile* profile) | 17 SyncedExtensionInstaller::SyncedExtensionInstaller(Profile* profile) |
| 18 : profile_(profile), | 18 : profile_(profile), |
| 19 weak_ptr_factory_(this) { | 19 weak_ptr_factory_(this) { |
| 20 DoInstallSyncedExtensions(); | 20 DoInstallSyncedExtensions(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 base::ThreadTaskRunnerHandle::Get()->PostTask( | 41 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 42 FROM_HERE, | 42 FROM_HERE, |
| 43 base::Bind(&SyncedExtensionInstaller::DoInstallSyncedExtensions, | 43 base::Bind(&SyncedExtensionInstaller::DoInstallSyncedExtensions, |
| 44 weak_ptr_factory_.GetWeakPtr())); | 44 weak_ptr_factory_.GetWeakPtr())); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void SyncedExtensionInstaller::DoInstallSyncedExtensions() { | 47 void SyncedExtensionInstaller::DoInstallSyncedExtensions() { |
| 48 SyncExtensionHelper::GetInstance()->InstallExtensionsPendingForSync(profile_); | 48 SyncExtensionHelper::GetInstance()->InstallExtensionsPendingForSync(profile_); |
| 49 } | 49 } |
| OLD | NEW |