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

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

Issue 2917643002: PlzNavigate: Fix ServiceWorkerHandler not finding WebContents. (Closed)
Patch Set: Shorter comment. Created 3 years, 6 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 <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 ServiceWorkerVersionInfo info( 362 ServiceWorkerVersionInfo info(
363 running_status(), status(), fetch_handler_existence(), script_url(), 363 running_status(), status(), fetch_handler_existence(), script_url(),
364 registration_id(), version_id(), embedded_worker()->process_id(), 364 registration_id(), version_id(), embedded_worker()->process_id(),
365 embedded_worker()->thread_id(), 365 embedded_worker()->thread_id(),
366 embedded_worker()->worker_devtools_agent_route_id()); 366 embedded_worker()->worker_devtools_agent_route_id());
367 for (const auto& controllee : controllee_map_) { 367 for (const auto& controllee : controllee_map_) {
368 const ServiceWorkerProviderHost* host = controllee.second; 368 const ServiceWorkerProviderHost* host = controllee.second;
369 info.clients.insert(std::make_pair( 369 info.clients.insert(std::make_pair(
370 host->client_uuid(), 370 host->client_uuid(),
371 ServiceWorkerVersionInfo::ClientInfo( 371 ServiceWorkerVersionInfo::ClientInfo(
372 host->process_id(), host->route_id(), host->provider_type()))); 372 host->process_id(), host->route_id(), host->web_contents_getter(),
373 host->provider_type())));
373 } 374 }
374 if (!main_script_http_info_) 375 if (!main_script_http_info_)
375 return info; 376 return info;
376 info.script_response_time = main_script_http_info_->response_time; 377 info.script_response_time = main_script_http_info_->response_time;
377 if (main_script_http_info_->headers) 378 if (main_script_http_info_->headers)
378 main_script_http_info_->headers->GetLastModifiedValue( 379 main_script_http_info_->headers->GetLastModifiedValue(
379 &info.script_last_modified); 380 &info.script_last_modified);
380 return info; 381 return info;
381 } 382 }
382 383
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1818 1819
1819 void ServiceWorkerVersion::CleanUpExternalRequest( 1820 void ServiceWorkerVersion::CleanUpExternalRequest(
1820 const std::string& request_uuid, 1821 const std::string& request_uuid,
1821 ServiceWorkerStatusCode status) { 1822 ServiceWorkerStatusCode status) {
1822 if (status == SERVICE_WORKER_OK) 1823 if (status == SERVICE_WORKER_OK)
1823 return; 1824 return;
1824 external_request_uuid_to_request_id_.erase(request_uuid); 1825 external_request_uuid_to_request_id_.erase(request_uuid);
1825 } 1826 }
1826 1827
1827 } // namespace content 1828 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698