OLD | NEW |
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 "chrome/test/automation/automation_proxy.h" | 5 #include "chrome/test/automation/automation_proxy.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 void AutomationProxy::SetChannel(IPC::Channel* channel) { | 397 void AutomationProxy::SetChannel(IPC::Channel* channel) { |
398 if (tracker_.get()) | 398 if (tracker_.get()) |
399 tracker_->put_channel(channel); | 399 tracker_->put_channel(channel); |
400 } | 400 } |
401 | 401 |
402 void AutomationProxy::ResetChannel() { | 402 void AutomationProxy::ResetChannel() { |
403 if (tracker_.get()) | 403 if (tracker_.get()) |
404 tracker_->put_channel(NULL); | 404 tracker_->put_channel(NULL); |
405 } | 405 } |
406 | 406 |
407 bool AutomationProxy::BeginTracing(const std::string& categories) { | 407 bool AutomationProxy::BeginTracing(const std::string& category_patterns) { |
408 bool result = false; | 408 bool result = false; |
409 bool send_success = Send(new AutomationMsg_BeginTracing(categories, | 409 bool send_success = Send(new AutomationMsg_BeginTracing(category_patterns, |
410 &result)); | 410 &result)); |
411 return send_success && result; | 411 return send_success && result; |
412 } | 412 } |
413 | 413 |
414 bool AutomationProxy::EndTracing(std::string* json_trace_output) { | 414 bool AutomationProxy::EndTracing(std::string* json_trace_output) { |
415 bool success = false; | 415 bool success = false; |
416 size_t num_trace_chunks = 0; | 416 size_t num_trace_chunks = 0; |
417 if (!Send(new AutomationMsg_EndTracing(&num_trace_chunks, &success)) || | 417 if (!Send(new AutomationMsg_EndTracing(&num_trace_chunks, &success)) || |
418 !success) | 418 !success) |
419 return false; | 419 return false; |
(...skipping 22 matching lines...) Expand all Loading... |
442 } | 442 } |
443 | 443 |
444 bool AutomationProxy::SendJSONRequest(const std::string& request, | 444 bool AutomationProxy::SendJSONRequest(const std::string& request, |
445 int timeout_ms, | 445 int timeout_ms, |
446 std::string* response) { | 446 std::string* response) { |
447 bool result = false; | 447 bool result = false; |
448 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) | 448 if (!SendAutomationJSONRequest(this, request, timeout_ms, response, &result)) |
449 return false; | 449 return false; |
450 return result; | 450 return result; |
451 } | 451 } |
OLD | NEW |