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

Side by Side Diff: chrome/test/chromedriver/session_commands.cc

Issue 2321573002: //chrome misc: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Fix Win compilation Created 4 years, 3 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 | « chrome/test/chromedriver/chrome_launcher_unittest.cc ('k') | chrome/test/chromedriver/util.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) 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 return Status(kUnknownError, "missing or invalid 'file'"); 786 return Status(kUnknownError, "missing or invalid 'file'");
787 std::string zip_data; 787 std::string zip_data;
788 if (!Base64Decode(base64_zip_data, &zip_data)) 788 if (!Base64Decode(base64_zip_data, &zip_data))
789 return Status(kUnknownError, "unable to decode 'file'"); 789 return Status(kUnknownError, "unable to decode 'file'");
790 790
791 if (!session->temp_dir.IsValid()) { 791 if (!session->temp_dir.IsValid()) {
792 if (!session->temp_dir.CreateUniqueTempDir()) 792 if (!session->temp_dir.CreateUniqueTempDir())
793 return Status(kUnknownError, "unable to create temp dir"); 793 return Status(kUnknownError, "unable to create temp dir");
794 } 794 }
795 base::FilePath upload_dir; 795 base::FilePath upload_dir;
796 if (!base::CreateTemporaryDirInDir(session->temp_dir.path(), 796 if (!base::CreateTemporaryDirInDir(session->temp_dir.GetPath(),
797 FILE_PATH_LITERAL("upload"), 797 FILE_PATH_LITERAL("upload"),
798 &upload_dir)) { 798 &upload_dir)) {
799 return Status(kUnknownError, "unable to create temp dir"); 799 return Status(kUnknownError, "unable to create temp dir");
800 } 800 }
801 std::string error_msg; 801 std::string error_msg;
802 base::FilePath upload; 802 base::FilePath upload;
803 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); 803 Status status = UnzipSoleFile(upload_dir, zip_data, &upload);
804 if (status.IsError()) 804 if (status.IsError())
805 return Status(kUnknownError, "unable to unzip 'file'", status); 805 return Status(kUnknownError, "unable to unzip 'file'", status);
806 806
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 std::unique_ptr<base::Value>* value) { 871 std::unique_ptr<base::Value>* value) {
872 WebView* web_view = nullptr; 872 WebView* web_view = nullptr;
873 Status status = session->GetTargetWindow(&web_view); 873 Status status = session->GetTargetWindow(&web_view);
874 if (status.IsError()) 874 if (status.IsError())
875 return status; 875 return status;
876 status = web_view->DeleteScreenOrientation(); 876 status = web_view->DeleteScreenOrientation();
877 if (status.IsError()) 877 if (status.IsError())
878 return status; 878 return status;
879 return Status(kOk); 879 return Status(kOk);
880 } 880 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher_unittest.cc ('k') | chrome/test/chromedriver/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698