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

Side by Side Diff: chrome/test/chromedriver/util.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/session_commands.cc ('k') | chrome/test/chromedriver/util_unittest.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/util.h" 5 #include "chrome/test/chromedriver/util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 namespace { 91 namespace {
92 92
93 Status UnzipArchive(const base::FilePath& unzip_dir, 93 Status UnzipArchive(const base::FilePath& unzip_dir,
94 const std::string& bytes) { 94 const std::string& bytes) {
95 base::ScopedTempDir dir; 95 base::ScopedTempDir dir;
96 if (!dir.CreateUniqueTempDir()) 96 if (!dir.CreateUniqueTempDir())
97 return Status(kUnknownError, "unable to create temp dir"); 97 return Status(kUnknownError, "unable to create temp dir");
98 98
99 base::FilePath archive = dir.path().AppendASCII("temp.zip"); 99 base::FilePath archive = dir.GetPath().AppendASCII("temp.zip");
100 int length = bytes.length(); 100 int length = bytes.length();
101 if (base::WriteFile(archive, bytes.c_str(), length) != length) 101 if (base::WriteFile(archive, bytes.c_str(), length) != length)
102 return Status(kUnknownError, "could not write file to temp dir"); 102 return Status(kUnknownError, "could not write file to temp dir");
103 103
104 if (!zip::Unzip(archive, unzip_dir)) 104 if (!zip::Unzip(archive, unzip_dir))
105 return Status(kUnknownError, "could not unzip archive"); 105 return Status(kUnknownError, "could not unzip archive");
106 return Status(kOk); 106 return Status(kOk);
107 } 107 }
108 108
109 // Stream for writing binary data. 109 // Stream for writing binary data.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (session->chrome) { 427 if (session->chrome) {
428 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo(); 428 const BrowserInfo* browser_info = session->chrome->GetBrowserInfo();
429 status.AddDetails("Session info: " + browser_info->browser_name + "=" + 429 status.AddDetails("Session info: " + browser_info->browser_name + "=" +
430 browser_info->browser_version); 430 browser_info->browser_version);
431 } 431 }
432 return status; 432 return status;
433 } 433 }
434 } 434 }
435 return Status(kOk); 435 return Status(kOk);
436 } 436 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | chrome/test/chromedriver/util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698