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

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

Issue 127143003: [chromedriver] Reuse forwarded adb ports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits Created 6 years, 11 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 | Annotate | Revision Log
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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 } // namespace 158 } // namespace
159 159
160 Status ExecuteInitSession( 160 Status ExecuteInitSession(
161 const InitSessionParams& bound_params, 161 const InitSessionParams& bound_params,
162 Session* session, 162 Session* session,
163 const base::DictionaryValue& params, 163 const base::DictionaryValue& params,
164 scoped_ptr<base::Value>* value) { 164 scoped_ptr<base::Value>* value) {
165 Status status = InitSessionHelper(bound_params, session, params, value); 165 Status status = InitSessionHelper(bound_params, session, params, value);
166 if (status.IsError()) 166 if (status.IsError()) {
167 session->quit = true; 167 session->quit = true;
168 if (session->chrome != NULL)
169 session->chrome->Quit();
170 }
168 return status; 171 return status;
169 } 172 }
170 173
171 Status ExecuteQuit( 174 Status ExecuteQuit(
172 bool allow_detach, 175 bool allow_detach,
173 Session* session, 176 Session* session,
174 const base::DictionaryValue& params, 177 const base::DictionaryValue& params,
175 scoped_ptr<base::Value>* value) { 178 scoped_ptr<base::Value>* value) {
176 session->quit = true; 179 session->quit = true;
177 if (allow_detach && session->detach) 180 if (allow_detach && session->detach)
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 } 603 }
601 std::string error_msg; 604 std::string error_msg;
602 base::FilePath upload; 605 base::FilePath upload;
603 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); 606 Status status = UnzipSoleFile(upload_dir, zip_data, &upload);
604 if (status.IsError()) 607 if (status.IsError())
605 return Status(kUnknownError, "unable to unzip 'file'", status); 608 return Status(kUnknownError, "unable to unzip 'file'", status);
606 609
607 value->reset(new base::StringValue(upload.value())); 610 value->reset(new base::StringValue(upload.value()));
608 return Status(kOk); 611 return Status(kOk);
609 } 612 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698