| 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_dispatcher_host.h" | 5 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 TestingServiceWorkerDispatcherHost( | 28 TestingServiceWorkerDispatcherHost( |
| 29 int process_id, | 29 int process_id, |
| 30 ServiceWorkerContextWrapper* context_wrapper, | 30 ServiceWorkerContextWrapper* context_wrapper, |
| 31 EmbeddedWorkerTestHelper* helper) | 31 EmbeddedWorkerTestHelper* helper) |
| 32 : ServiceWorkerDispatcherHost(process_id, NULL), | 32 : ServiceWorkerDispatcherHost(process_id, NULL), |
| 33 bad_messages_received_count_(0), | 33 bad_messages_received_count_(0), |
| 34 helper_(helper) { | 34 helper_(helper) { |
| 35 Init(context_wrapper); | 35 Init(context_wrapper); |
| 36 } | 36 } |
| 37 | 37 |
| 38 virtual bool Send(IPC::Message* message) OVERRIDE { | 38 virtual bool Send(IPC::Message* message) override { |
| 39 return helper_->Send(message); | 39 return helper_->Send(message); |
| 40 } | 40 } |
| 41 | 41 |
| 42 IPC::TestSink* ipc_sink() { return helper_->ipc_sink(); } | 42 IPC::TestSink* ipc_sink() { return helper_->ipc_sink(); } |
| 43 | 43 |
| 44 virtual void BadMessageReceived() OVERRIDE { | 44 virtual void BadMessageReceived() override { |
| 45 ++bad_messages_received_count_; | 45 ++bad_messages_received_count_; |
| 46 } | 46 } |
| 47 | 47 |
| 48 int bad_messages_received_count_; | 48 int bad_messages_received_count_; |
| 49 | 49 |
| 50 protected: | 50 protected: |
| 51 EmbeddedWorkerTestHelper* helper_; | 51 EmbeddedWorkerTestHelper* helper_; |
| 52 virtual ~TestingServiceWorkerDispatcherHost() {} | 52 virtual ~TestingServiceWorkerDispatcherHost() {} |
| 53 }; | 53 }; |
| 54 | 54 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 // Let the shutdown reach the simulated IO thread. | 338 // Let the shutdown reach the simulated IO thread. |
| 339 base::RunLoop().RunUntilIdle(); | 339 base::RunLoop().RunUntilIdle(); |
| 340 | 340 |
| 341 GetRegistration(-1, | 341 GetRegistration(-1, |
| 342 GURL(), | 342 GURL(), |
| 343 ServiceWorkerMsg_ServiceWorkerGetRegistrationError::ID); | 343 ServiceWorkerMsg_ServiceWorkerGetRegistrationError::ID); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace content | 346 } // namespace content |
| OLD | NEW |