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

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

Issue 1623583003: Add async tracing to SWVersion::AddRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch instead of array of strings Created 4 years, 11 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/browser/service_worker/service_worker_metrics.h » ('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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 background_sync_controller->GetParameterOverrides(parameters.get()); 120 background_sync_controller->GetParameterOverrides(parameters.get());
121 return parameters; 121 return parameters;
122 } 122 }
123 123
124 void OnSyncEventFinished( 124 void OnSyncEventFinished(
125 const scoped_refptr<ServiceWorkerVersion>& active_version, 125 const scoped_refptr<ServiceWorkerVersion>& active_version,
126 int request_id, 126 int request_id,
127 const ServiceWorkerVersion::StatusCallback& callback, 127 const ServiceWorkerVersion::StatusCallback& callback,
128 ServiceWorkerEventStatus status) { 128 ServiceWorkerEventStatus status) {
129 TRACE_EVENT1("ServiceWorker", "BackgroundSyncManager::OnSyncEventFinished",
130 "Request id", request_id);
131 if (!active_version->FinishRequest(request_id)) 129 if (!active_version->FinishRequest(request_id))
132 return; 130 return;
133 callback.Run(mojo::ConvertTo<ServiceWorkerStatusCode>(status)); 131 callback.Run(mojo::ConvertTo<ServiceWorkerStatusCode>(status));
134 } 132 }
135 133
136 } // namespace 134 } // namespace
137 135
138 BackgroundSyncManager::BackgroundSyncRegistrations:: 136 BackgroundSyncManager::BackgroundSyncRegistrations::
139 BackgroundSyncRegistrations() 137 BackgroundSyncRegistrations()
140 : next_id(BackgroundSyncRegistration::kInitialId) { 138 : next_id(BackgroundSyncRegistration::kInitialId) {
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 BackgroundSyncManager::MakeStatusCompletion(const StatusCallback& callback) { 1526 BackgroundSyncManager::MakeStatusCompletion(const StatusCallback& callback) {
1529 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1527 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1530 1528
1531 return base::Bind( 1529 return base::Bind(
1532 &BackgroundSyncManager::CompleteOperationCallback<StatusCallback, 1530 &BackgroundSyncManager::CompleteOperationCallback<StatusCallback,
1533 BackgroundSyncStatus>, 1531 BackgroundSyncStatus>,
1534 weak_ptr_factory_.GetWeakPtr(), callback); 1532 weak_ptr_factory_.GetWeakPtr(), callback);
1535 } 1533 }
1536 1534
1537 } // namespace content 1535 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698