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

Side by Side Diff: content/browser/service_worker/embedded_worker_test_helper.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 28 matching lines...) Expand all
39 // methods to add their own logic/verification code. 39 // methods to add their own logic/verification code.
40 // 40 //
41 // See embedded_worker_instance_unittest.cc for example usages. 41 // See embedded_worker_instance_unittest.cc for example usages.
42 // 42 //
43 class EmbeddedWorkerTestHelper : public IPC::Sender, 43 class EmbeddedWorkerTestHelper : public IPC::Sender,
44 public IPC::Listener { 44 public IPC::Listener {
45 public: 45 public:
46 // Initialize this helper for |context|, and enable this as an IPC 46 // Initialize this helper for |context|, and enable this as an IPC
47 // sender for |mock_render_process_id|. 47 // sender for |mock_render_process_id|.
48 explicit EmbeddedWorkerTestHelper(int mock_render_process_id); 48 explicit EmbeddedWorkerTestHelper(int mock_render_process_id);
49 virtual ~EmbeddedWorkerTestHelper(); 49 ~EmbeddedWorkerTestHelper() override;
50 50
51 // Call this to simulate add/associate a process to a pattern. 51 // Call this to simulate add/associate a process to a pattern.
52 // This also registers this sender for the process. 52 // This also registers this sender for the process.
53 void SimulateAddProcessToPattern(const GURL& pattern, int process_id); 53 void SimulateAddProcessToPattern(const GURL& pattern, int process_id);
54 54
55 // IPC::Sender implementation. 55 // IPC::Sender implementation.
56 virtual bool Send(IPC::Message* message) override; 56 bool Send(IPC::Message* message) override;
57 57
58 // IPC::Listener implementation. 58 // IPC::Listener implementation.
59 virtual bool OnMessageReceived(const IPC::Message& msg) override; 59 bool OnMessageReceived(const IPC::Message& msg) override;
60 60
61 // IPC sink for EmbeddedWorker messages. 61 // IPC sink for EmbeddedWorker messages.
62 IPC::TestSink* ipc_sink() { return &sink_; } 62 IPC::TestSink* ipc_sink() { return &sink_; }
63 // Inner IPC sink for script context messages sent via EmbeddedWorker. 63 // Inner IPC sink for script context messages sent via EmbeddedWorker.
64 IPC::TestSink* inner_ipc_sink() { return &inner_sink_; } 64 IPC::TestSink* inner_ipc_sink() { return &inner_sink_; }
65 65
66 ServiceWorkerContextCore* context(); 66 ServiceWorkerContextCore* context();
67 ServiceWorkerContextWrapper* context_wrapper() { return wrapper_.get(); } 67 ServiceWorkerContextWrapper* context_wrapper() { return wrapper_.get(); }
68 void ShutdownContext(); 68 void ShutdownContext();
69 69
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 int current_embedded_worker_id_; 134 int current_embedded_worker_id_;
135 135
136 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_; 136 base::WeakPtrFactory<EmbeddedWorkerTestHelper> weak_factory_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper); 138 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerTestHelper);
139 }; 139 };
140 140
141 } // namespace content 141 } // namespace content
142 142
143 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_ 143 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « content/browser/security_exploit_browsertest.cc ('k') | content/browser/service_worker/service_worker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698