OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/test/chromedriver/session_commands.h" | 5 #include "chrome/test/chromedriver/session_commands.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 } | 600 } |
601 std::string error_msg; | 601 std::string error_msg; |
602 base::FilePath upload; | 602 base::FilePath upload; |
603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); | 603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); |
604 if (status.IsError()) | 604 if (status.IsError()) |
605 return Status(kUnknownError, "unable to unzip 'file'", status); | 605 return Status(kUnknownError, "unable to unzip 'file'", status); |
606 | 606 |
607 value->reset(new base::StringValue(upload.value())); | 607 value->reset(new base::StringValue(upload.value())); |
608 return Status(kOk); | 608 return Status(kOk); |
609 } | 609 } |
| 610 |
| 611 Status ExecuteIsAutoReporting( |
| 612 Session* session, |
| 613 const base::DictionaryValue& params, |
| 614 scoped_ptr<base::Value>* value) { |
| 615 value->reset(new base::FundamentalValue(session->auto_reporting_enabled)); |
| 616 return Status(kOk); |
| 617 } |
| 618 |
| 619 Status ExecuteSetAutoReporting( |
| 620 Session* session, |
| 621 const base::DictionaryValue& params, |
| 622 scoped_ptr<base::Value>* value) { |
| 623 bool enabled; |
| 624 if (!params.GetBoolean("enabled", &enabled)) |
| 625 return Status(kUnknownError, "missing parameter 'enabled'"); |
| 626 session->auto_reporting_enabled = enabled; |
| 627 return Status(kOk); |
| 628 } |
OLD | NEW |