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/embedded_worker_instance.h" | 5 #include "content/browser/service_worker/embedded_worker_instance.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 // Notify the instance that a process is allocated. | 356 // Notify the instance that a process is allocated. |
357 state_ = ProcessAllocationState::ALLOCATED; | 357 state_ = ProcessAllocationState::ALLOCATED; |
358 instance_->OnProcessAllocated( | 358 instance_->OnProcessAllocated( |
359 base::MakeUnique<WorkerProcessHandle>(instance_->context_, | 359 base::MakeUnique<WorkerProcessHandle>(instance_->context_, |
360 instance_->embedded_worker_id(), | 360 instance_->embedded_worker_id(), |
361 process_id, is_new_process), | 361 process_id, is_new_process), |
362 start_situation); | 362 start_situation); |
363 | 363 |
364 // TODO(bengr): Support changes to this setting while the worker | 364 // TODO(bengr): Support changes to this setting while the worker |
365 // is running. | 365 // is running. |
366 params->settings.data_saver_enabled = settings.data_saver_enabled; | 366 params->settings.data_saver_flag = settings.data_saver_flag; |
367 | 367 |
368 TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("ServiceWorker", | 368 TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("ServiceWorker", |
369 "REGISTERING_TO_DEVTOOLS", instance_); | 369 "REGISTERING_TO_DEVTOOLS", instance_); |
370 // Register the instance to DevToolsManager on UI thread. | 370 // Register the instance to DevToolsManager on UI thread. |
371 const int64_t service_worker_version_id = params->service_worker_version_id; | 371 const int64_t service_worker_version_id = params->service_worker_version_id; |
372 const GURL& scope = params->scope; | 372 const GURL& scope = params->scope; |
373 GURL script_url(params->script_url); | 373 GURL script_url(params->script_url); |
374 BrowserThread::PostTask( | 374 BrowserThread::PostTask( |
375 BrowserThread::UI, FROM_HERE, | 375 BrowserThread::UI, FROM_HERE, |
376 base::Bind(&SetupOnUI, process_id, instance_->context_.get(), | 376 base::Bind(&SetupOnUI, process_id, instance_->context_.get(), |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 case SCRIPT_READ_FINISHED: | 972 case SCRIPT_READ_FINISHED: |
973 return "Script read finished"; | 973 return "Script read finished"; |
974 case STARTING_PHASE_MAX_VALUE: | 974 case STARTING_PHASE_MAX_VALUE: |
975 NOTREACHED(); | 975 NOTREACHED(); |
976 } | 976 } |
977 NOTREACHED() << phase; | 977 NOTREACHED() << phase; |
978 return std::string(); | 978 return std::string(); |
979 } | 979 } |
980 | 980 |
981 } // namespace content | 981 } // namespace content |
OLD | NEW |