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

Side by Side Diff: content/test/test_background_sync_manager.cc

Issue 1960843002: [OnionSoup] Move background_sync.mojom from //content to //third_party/WebKit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng@'s comment Created 4 years, 7 months 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
« no previous file with comments | « content/test/test_background_sync_manager.h ('k') | content/utility/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/test/test_background_sync_manager.h" 5 #include "content/test/test_background_sync_manager.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/service_worker/service_worker_context_wrapper.h" 9 #include "content/browser/service_worker/service_worker_context_wrapper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 base::Unretained(this), key, callback); 70 base::Unretained(this), key, callback);
71 if (delay_backend_) 71 if (delay_backend_)
72 return; 72 return;
73 73
74 ResumeBackendOperation(); 74 ResumeBackendOperation();
75 } 75 }
76 76
77 void TestBackgroundSyncManager::DispatchSyncEvent( 77 void TestBackgroundSyncManager::DispatchSyncEvent(
78 const std::string& tag, 78 const std::string& tag,
79 const scoped_refptr<ServiceWorkerVersion>& active_version, 79 const scoped_refptr<ServiceWorkerVersion>& active_version,
80 mojom::BackgroundSyncEventLastChance last_chance, 80 blink::mojom::BackgroundSyncEventLastChance last_chance,
81 const ServiceWorkerVersion::StatusCallback& callback) { 81 const ServiceWorkerVersion::StatusCallback& callback) {
82 ASSERT_FALSE(dispatch_sync_callback_.is_null()); 82 ASSERT_FALSE(dispatch_sync_callback_.is_null());
83 last_chance_ = last_chance; 83 last_chance_ = last_chance;
84 dispatch_sync_callback_.Run(active_version, callback); 84 dispatch_sync_callback_.Run(active_version, callback);
85 } 85 }
86 86
87 void TestBackgroundSyncManager::ScheduleDelayedTask( 87 void TestBackgroundSyncManager::ScheduleDelayedTask(
88 const base::Closure& callback, 88 const base::Closure& callback,
89 base::TimeDelta delay) { 89 base::TimeDelta delay) {
90 delayed_task_ = callback; 90 delayed_task_ = callback;
(...skipping 17 matching lines...) Expand all
108 } 108 }
109 109
110 void TestBackgroundSyncManager::GetDataFromBackendContinue( 110 void TestBackgroundSyncManager::GetDataFromBackendContinue(
111 const std::string& key, 111 const std::string& key,
112 const ServiceWorkerStorage::GetUserDataForAllRegistrationsCallback& 112 const ServiceWorkerStorage::GetUserDataForAllRegistrationsCallback&
113 callback) { 113 callback) {
114 BackgroundSyncManager::GetDataFromBackend(key, callback); 114 BackgroundSyncManager::GetDataFromBackend(key, callback);
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_background_sync_manager.h ('k') | content/utility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698