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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 273
274 Status ExecuteGetCurrentWindowHandle(Session* session, 274 Status ExecuteGetCurrentWindowHandle(Session* session,
275 const base::DictionaryValue& params, 275 const base::DictionaryValue& params,
276 std::unique_ptr<base::Value>* value) { 276 std::unique_ptr<base::Value>* value) {
277 WebView* web_view = NULL; 277 WebView* web_view = NULL;
278 Status status = session->GetTargetWindow(&web_view); 278 Status status = session->GetTargetWindow(&web_view);
279 if (status.IsError()) 279 if (status.IsError())
280 return status; 280 return status;
281 281
282 value->reset( 282 value->reset(new base::Value(WebViewIdToWindowHandle(web_view->GetId())));
283 new base::StringValue(WebViewIdToWindowHandle(web_view->GetId())));
284 return Status(kOk); 283 return Status(kOk);
285 } 284 }
286 285
287 Status ExecuteLaunchApp(Session* session, 286 Status ExecuteLaunchApp(Session* session,
288 const base::DictionaryValue& params, 287 const base::DictionaryValue& params,
289 std::unique_ptr<base::Value>* value) { 288 std::unique_ptr<base::Value>* value) {
290 std::string id; 289 std::string id;
291 if (!params.GetString("id", &id)) 290 if (!params.GetString("id", &id))
292 return Status(kUnknownError, "'id' must be a string"); 291 return Status(kUnknownError, "'id' must be a string");
293 292
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 FILE_PATH_LITERAL("upload"), 814 FILE_PATH_LITERAL("upload"),
816 &upload_dir)) { 815 &upload_dir)) {
817 return Status(kUnknownError, "unable to create temp dir"); 816 return Status(kUnknownError, "unable to create temp dir");
818 } 817 }
819 std::string error_msg; 818 std::string error_msg;
820 base::FilePath upload; 819 base::FilePath upload;
821 Status status = UnzipSoleFile(upload_dir, zip_data, &upload); 820 Status status = UnzipSoleFile(upload_dir, zip_data, &upload);
822 if (status.IsError()) 821 if (status.IsError())
823 return Status(kUnknownError, "unable to unzip 'file'", status); 822 return Status(kUnknownError, "unable to unzip 'file'", status);
824 823
825 value->reset(new base::StringValue(upload.value())); 824 value->reset(new base::Value(upload.value()));
826 return Status(kOk); 825 return Status(kOk);
827 } 826 }
828 827
829 Status ExecuteIsAutoReporting(Session* session, 828 Status ExecuteIsAutoReporting(Session* session,
830 const base::DictionaryValue& params, 829 const base::DictionaryValue& params,
831 std::unique_ptr<base::Value>* value) { 830 std::unique_ptr<base::Value>* value) {
832 value->reset(new base::Value(session->auto_reporting_enabled)); 831 value->reset(new base::Value(session->auto_reporting_enabled));
833 return Status(kOk); 832 return Status(kOk);
834 } 833 }
835 834
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 std::unique_ptr<base::Value>* value) { 888 std::unique_ptr<base::Value>* value) {
890 WebView* web_view = nullptr; 889 WebView* web_view = nullptr;
891 Status status = session->GetTargetWindow(&web_view); 890 Status status = session->GetTargetWindow(&web_view);
892 if (status.IsError()) 891 if (status.IsError())
893 return status; 892 return status;
894 status = web_view->DeleteScreenOrientation(); 893 status = web_view->DeleteScreenOrientation();
895 if (status.IsError()) 894 if (status.IsError())
896 return status; 895 return status;
897 return Status(kOk); 896 return Status(kOk);
898 } 897 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_commands.cc ('k') | chrome/test/chromedriver/window_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698