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/webdriver/commands/file_upload_command.h" | 5 #include "chrome/test/webdriver/commands/file_upload_command.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 return; | 47 return; |
48 } | 48 } |
49 std::string error_msg; | 49 std::string error_msg; |
50 base::FilePath upload; | 50 base::FilePath upload; |
51 if (!UnzipSoleFile(upload_dir, zip_data, &upload, &error_msg)) { | 51 if (!UnzipSoleFile(upload_dir, zip_data, &upload, &error_msg)) { |
52 response->SetError(new Error(kUnknownError, error_msg)); | 52 response->SetError(new Error(kUnknownError, error_msg)); |
53 return; | 53 return; |
54 } | 54 } |
55 | 55 |
56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
57 response->SetValue(new base::StringValue(WideToUTF8(upload.value()))); | 57 response->SetValue(new base::StringValue(base::WideToUTF8(upload.value()))); |
58 #else | 58 #else |
59 response->SetValue(new base::StringValue(upload.value())); | 59 response->SetValue(new base::StringValue(upload.value())); |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 } // namespace webdriver | 63 } // namespace webdriver |
OLD | NEW |