| OLD | NEW |
| 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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 base::CompareCase::SENSITIVE)) { | 1389 base::CompareCase::SENSITIVE)) { |
| 1390 DVLOG(1) << "Received unexpected invalid URL from renderer process."; | 1390 DVLOG(1) << "Received unexpected invalid URL from renderer process."; |
| 1391 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 1391 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 1392 base::BindOnce(&KillEmbeddedWorkerProcess, | 1392 base::BindOnce(&KillEmbeddedWorkerProcess, |
| 1393 embedded_worker_->process_id(), | 1393 embedded_worker_->process_id(), |
| 1394 RESULT_CODE_KILLED_BAD_MESSAGE)); | 1394 RESULT_CODE_KILLED_BAD_MESSAGE)); |
| 1395 return; | 1395 return; |
| 1396 } | 1396 } |
| 1397 } | 1397 } |
| 1398 for (const url::Origin& url : origins) { | 1398 for (const url::Origin& url : origins) { |
| 1399 if (url.unique()) { | 1399 if (url.opaque()) { |
| 1400 DVLOG(1) << "Received unexpected unique origin from renderer process."; | 1400 DVLOG(1) << "Received unexpected unique origin from renderer process."; |
| 1401 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 1401 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 1402 base::BindOnce(&KillEmbeddedWorkerProcess, | 1402 base::BindOnce(&KillEmbeddedWorkerProcess, |
| 1403 embedded_worker_->process_id(), | 1403 embedded_worker_->process_id(), |
| 1404 RESULT_CODE_KILLED_BAD_MESSAGE)); | 1404 RESULT_CODE_KILLED_BAD_MESSAGE)); |
| 1405 return; | 1405 return; |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 set_foreign_fetch_scopes(sub_scopes); | 1408 set_foreign_fetch_scopes(sub_scopes); |
| 1409 set_foreign_fetch_origins(origins); | 1409 set_foreign_fetch_origins(origins); |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 | 1909 |
| 1910 void ServiceWorkerVersion::CleanUpExternalRequest( | 1910 void ServiceWorkerVersion::CleanUpExternalRequest( |
| 1911 const std::string& request_uuid, | 1911 const std::string& request_uuid, |
| 1912 ServiceWorkerStatusCode status) { | 1912 ServiceWorkerStatusCode status) { |
| 1913 if (status == SERVICE_WORKER_OK) | 1913 if (status == SERVICE_WORKER_OK) |
| 1914 return; | 1914 return; |
| 1915 external_request_uuid_to_request_id_.erase(request_uuid); | 1915 external_request_uuid_to_request_id_.erase(request_uuid); |
| 1916 } | 1916 } |
| 1917 | 1917 |
| 1918 } // namespace content | 1918 } // namespace content |
| OLD | NEW |