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

Side by Side Diff: chrome/test/chromedriver/window_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
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | chromeos/dbus/fake_shill_device_client.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/window_commands.h" 5 #include "chrome/test/chromedriver/window_commands.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 browser_info->major_version <= 30 && 479 browser_info->major_version <= 30 &&
480 browser_info->is_android; 480 browser_info->is_android;
481 if (!is_kitkat_webview) { 481 if (!is_kitkat_webview) {
482 // Page.getNavigationHistory isn't implemented in WebView for KitKat and 482 // Page.getNavigationHistory isn't implemented in WebView for KitKat and
483 // older Android releases. 483 // older Android releases.
484 status = web_view->GetUrl(&url); 484 status = web_view->GetUrl(&url);
485 if (status.IsError()) 485 if (status.IsError())
486 return status; 486 return status;
487 } 487 }
488 } 488 }
489 value->reset(new base::StringValue(url)); 489 value->reset(new base::Value(url));
490 return Status(kOk); 490 return Status(kOk);
491 } 491 }
492 492
493 Status ExecuteGoBack(Session* session, 493 Status ExecuteGoBack(Session* session,
494 WebView* web_view, 494 WebView* web_view,
495 const base::DictionaryValue& params, 495 const base::DictionaryValue& params,
496 std::unique_ptr<base::Value>* value, 496 std::unique_ptr<base::Value>* value,
497 Timeout* timeout) { 497 Timeout* timeout) {
498 timeout->SetDuration(session->page_load_timeout); 498 timeout->SetDuration(session->page_load_timeout);
499 Status status = web_view->TraverseHistory(-1, timeout); 499 Status status = web_view->TraverseHistory(-1, timeout);
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 } else { 878 } else {
879 status = web_view->CaptureScreenshot(&screenshot); 879 status = web_view->CaptureScreenshot(&screenshot);
880 } 880 }
881 if (status.IsError()) { 881 if (status.IsError()) {
882 LOG(WARNING) << "screenshot failed, retrying"; 882 LOG(WARNING) << "screenshot failed, retrying";
883 status = web_view->CaptureScreenshot(&screenshot); 883 status = web_view->CaptureScreenshot(&screenshot);
884 } 884 }
885 if (status.IsError()) 885 if (status.IsError())
886 return status; 886 return status;
887 887
888 value->reset(new base::StringValue(screenshot)); 888 value->reset(new base::Value(screenshot));
889 return Status(kOk); 889 return Status(kOk);
890 } 890 }
891 891
892 Status ExecuteGetCookies(Session* session, 892 Status ExecuteGetCookies(Session* session,
893 WebView* web_view, 893 WebView* web_view,
894 const base::DictionaryValue& params, 894 const base::DictionaryValue& params,
895 std::unique_ptr<base::Value>* value, 895 std::unique_ptr<base::Value>* value,
896 Timeout* timeout) { 896 Timeout* timeout) {
897 std::list<Cookie> cookies; 897 std::list<Cookie> cookies;
898 Status status = GetVisibleCookies(web_view, &cookies); 898 Status status = GetVisibleCookies(web_view, &cookies);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 return status; 1077 return status;
1078 } 1078 }
1079 1079
1080 Status ExecuteTakeHeapSnapshot(Session* session, 1080 Status ExecuteTakeHeapSnapshot(Session* session,
1081 WebView* web_view, 1081 WebView* web_view,
1082 const base::DictionaryValue& params, 1082 const base::DictionaryValue& params,
1083 std::unique_ptr<base::Value>* value, 1083 std::unique_ptr<base::Value>* value,
1084 Timeout* timeout) { 1084 Timeout* timeout) {
1085 return web_view->TakeHeapSnapshot(value); 1085 return web_view->TakeHeapSnapshot(value);
1086 } 1086 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | chromeos/dbus/fake_shill_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698