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

Side by Side Diff: content/browser/background_sync/background_sync_manager.cc

Issue 2274283003: Use mojo.common.mojom.Time for dispatch_event_time in background_sync.mojom (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | content/renderer/background_sync/background_sync_client_impl.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/background_sync/background_sync_manager.h" 5 #include "content/browser/background_sync/background_sync_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/barrier_closure.h" 9 #include "base/barrier_closure.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 background_sync_controller->GetParameterOverrides(parameters.get()); 146 background_sync_controller->GetParameterOverrides(parameters.get());
147 return parameters; 147 return parameters;
148 } 148 }
149 149
150 void OnSyncEventFinished(scoped_refptr<ServiceWorkerVersion> active_version, 150 void OnSyncEventFinished(scoped_refptr<ServiceWorkerVersion> active_version,
151 int request_id, 151 int request_id,
152 const ServiceWorkerVersion::StatusCallback& callback, 152 const ServiceWorkerVersion::StatusCallback& callback,
153 blink::mojom::ServiceWorkerEventStatus status, 153 blink::mojom::ServiceWorkerEventStatus status,
154 double dispatch_event_time) { 154 base::Time dispatch_event_time) {
155 if (!active_version->FinishRequest( 155 if (!active_version->FinishRequest(
156 request_id, 156 request_id,
157 status == blink::mojom::ServiceWorkerEventStatus::COMPLETED, 157 status == blink::mojom::ServiceWorkerEventStatus::COMPLETED,
158 base::Time::FromDoubleT(dispatch_event_time))) { 158 dispatch_event_time)) {
159 return; 159 return;
160 } 160 }
161 callback.Run(mojo::ConvertTo<ServiceWorkerStatusCode>(status)); 161 callback.Run(mojo::ConvertTo<ServiceWorkerStatusCode>(status));
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 165
166 BackgroundSyncManager::BackgroundSyncRegistrations:: 166 BackgroundSyncManager::BackgroundSyncRegistrations::
167 BackgroundSyncRegistrations() 167 BackgroundSyncRegistrations()
168 : next_id(BackgroundSyncRegistration::kInitialId) { 168 : next_id(BackgroundSyncRegistration::kInitialId) {
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 parameters_->max_sync_attempts = max_attempts; 1191 parameters_->max_sync_attempts = max_attempts;
1192 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 1192 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
1193 } 1193 }
1194 1194
1195 base::Closure BackgroundSyncManager::MakeEmptyCompletion() { 1195 base::Closure BackgroundSyncManager::MakeEmptyCompletion() {
1196 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1196 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1197 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing)); 1197 return op_scheduler_.WrapCallbackToRunNext(base::Bind(&base::DoNothing));
1198 } 1198 }
1199 1199
1200 } // namespace content 1200 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/background_sync/background_sync_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698