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

Side by Side Diff: content/browser/service_worker/service_worker_version.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/service_worker/service_worker_version.h" 5 #include "content/browser/service_worker/service_worker_version.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 "Request id", request_id); 1389 "Request id", request_id);
1390 PendingRequest<ServicePortConnectCallback>* request = 1390 PendingRequest<ServicePortConnectCallback>* request =
1391 service_port_connect_requests_.Lookup(request_id); 1391 service_port_connect_requests_.Lookup(request_id);
1392 if (!request) { 1392 if (!request) {
1393 NOTREACHED() << "Got unexpected message: " << request_id; 1393 NOTREACHED() << "Got unexpected message: " << request_id;
1394 return; 1394 return;
1395 } 1395 }
1396 1396
1397 scoped_refptr<ServiceWorkerVersion> protect(this); 1397 scoped_refptr<ServiceWorkerVersion> protect(this);
1398 request->callback.Run(SERVICE_WORKER_OK, 1398 request->callback.Run(SERVICE_WORKER_OK,
1399 result == SERVICE_PORT_CONNECT_RESULT_ACCEPT, 1399 result == ServicePortConnectResult::ACCEPT,
1400 name.To<base::string16>(), data.To<base::string16>()); 1400 name.To<base::string16>(), data.To<base::string16>());
1401 RemoveCallbackAndStopIfRedundant(&service_port_connect_requests_, request_id); 1401 RemoveCallbackAndStopIfRedundant(&service_port_connect_requests_, request_id);
1402 } 1402 }
1403 1403
1404 void ServiceWorkerVersion::OnOpenWindow(int request_id, GURL url) { 1404 void ServiceWorkerVersion::OnOpenWindow(int request_id, GURL url) {
1405 // Just abort if we are shutting down. 1405 // Just abort if we are shutting down.
1406 if (!context_) 1406 if (!context_)
1407 return; 1407 return;
1408 1408
1409 if (!url.is_valid()) { 1409 if (!url.is_valid()) {
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2277 void ServiceWorkerVersion::OnBeginEvent() { 2277 void ServiceWorkerVersion::OnBeginEvent() {
2278 if (should_exclude_from_uma_ || running_status() != RUNNING || 2278 if (should_exclude_from_uma_ || running_status() != RUNNING ||
2279 idle_time_.is_null()) { 2279 idle_time_.is_null()) {
2280 return; 2280 return;
2281 } 2281 }
2282 ServiceWorkerMetrics::RecordTimeBetweenEvents(base::TimeTicks::Now() - 2282 ServiceWorkerMetrics::RecordTimeBetweenEvents(base::TimeTicks::Now() -
2283 idle_time_); 2283 idle_time_);
2284 } 2284 }
2285 2285
2286 } // namespace content 2286 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698