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

Side by Side Diff: net/test/spawned_test_server/spawner_communicator.cc

Issue 2041033003: clang-tidy WaitableEvent refactor (Android side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0_windows
Patch Set: Created 4 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
« no previous file with comments | « mojo/message_pump/message_pump_mojo.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/test/spawned_test_server/spawner_communicator.h" 5 #include "net/test/spawned_test_server/spawner_communicator.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // sending a command to spawner server. 97 // sending a command to spawner server.
98 int response_started_count_; 98 int response_started_count_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(SpawnerRequestData); 100 DISALLOW_COPY_AND_ASSIGN(SpawnerRequestData);
101 }; 101 };
102 102
103 } // namespace 103 } // namespace
104 104
105 SpawnerCommunicator::SpawnerCommunicator(uint16_t port) 105 SpawnerCommunicator::SpawnerCommunicator(uint16_t port)
106 : io_thread_("spawner_communicator"), 106 : io_thread_("spawner_communicator"),
107 event_(false, false), 107 event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
108 base::WaitableEvent::InitialState::NOT_SIGNALED),
108 port_(port), 109 port_(port),
109 next_id_(0), 110 next_id_(0),
110 is_running_(false), 111 is_running_(false),
111 weak_factory_(this) {} 112 weak_factory_(this) {}
112 113
113 SpawnerCommunicator::~SpawnerCommunicator() { 114 SpawnerCommunicator::~SpawnerCommunicator() {
114 DCHECK(!is_running_); 115 DCHECK(!is_running_);
115 } 116 }
116 117
117 void SpawnerCommunicator::WaitForResponse() { 118 void SpawnerCommunicator::WaitForResponse() {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 std::string server_return_data; 377 std::string server_return_data;
377 int result_code; 378 int result_code;
378 SendCommandAndWaitForResult("kill", "", &result_code, &server_return_data); 379 SendCommandAndWaitForResult("kill", "", &result_code, &server_return_data);
379 Shutdown(); 380 Shutdown();
380 if (OK != result_code || server_return_data != "killed") 381 if (OK != result_code || server_return_data != "killed")
381 return false; 382 return false;
382 return true; 383 return true;
383 } 384 }
384 385
385 } // namespace net 386 } // namespace net
OLDNEW
« no previous file with comments | « mojo/message_pump/message_pump_mojo.cc ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698