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

Side by Side Diff: chrome/test/chromedriver/server/http_handler.cc

Issue 2775913003: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome (Closed)
Patch Set: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome Created 3 years, 7 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/element_util.cc ('k') | chrome/test/chromedriver/session_commands.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/server/http_handler.h" 5 #include "chrome/test/chromedriver/server/http_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (status.IsError()) { 747 if (status.IsError()) {
748 Status full_status(status); 748 Status full_status(status);
749 full_status.AddDetails(base::StringPrintf( 749 full_status.AddDetails(base::StringPrintf(
750 "Driver info: chromedriver=%s,platform=%s %s %s", 750 "Driver info: chromedriver=%s,platform=%s %s %s",
751 kChromeDriverVersion, 751 kChromeDriverVersion,
752 base::SysInfo::OperatingSystemName().c_str(), 752 base::SysInfo::OperatingSystemName().c_str(),
753 base::SysInfo::OperatingSystemVersion().c_str(), 753 base::SysInfo::OperatingSystemVersion().c_str(),
754 base::SysInfo::OperatingSystemArchitecture().c_str())); 754 base::SysInfo::OperatingSystemArchitecture().c_str()));
755 std::unique_ptr<base::DictionaryValue> error(new base::DictionaryValue()); 755 std::unique_ptr<base::DictionaryValue> error(new base::DictionaryValue());
756 error->SetString("message", full_status.message()); 756 error->SetString("message", full_status.message());
757 value.reset(error.release()); 757 value = std::move(error);
758 } 758 }
759 if (!value) 759 if (!value)
760 value = base::MakeUnique<base::Value>(); 760 value = base::MakeUnique<base::Value>();
761 761
762 base::DictionaryValue body_params; 762 base::DictionaryValue body_params;
763 body_params.SetInteger("status", status.code()); 763 body_params.SetInteger("status", status.code());
764 body_params.Set("value", value.release()); 764 body_params.Set("value", value.release());
765 body_params.SetString("sessionId", session_id); 765 body_params.SetString("sessionId", session_id);
766 std::string body; 766 std::string body;
767 base::JSONWriter::WriteWithOptions( 767 base::JSONWriter::WriteWithOptions(
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 params.SetString(name, decoded); 904 params.SetString(name, decoded);
905 } else if (command_path_parts[i] != path_parts[i]) { 905 } else if (command_path_parts[i] != path_parts[i]) {
906 return false; 906 return false;
907 } 907 }
908 } 908 }
909 out_params->MergeDictionary(&params); 909 out_params->MergeDictionary(&params);
910 return true; 910 return true;
911 } 911 }
912 912
913 } // namespace internal 913 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_util.cc ('k') | chrome/test/chromedriver/session_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698