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

Unified Diff: chrome/browser/chromeos/login/helper.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/helper.h ('k') | chrome/browser/chromeos/login/hid_detection_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/helper.cc
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc
index ae74d166e1459c219328d64c64b22a66a7b7cb44..85e4283483b7cf04c3a70d459c783894e193e4f7 100644
--- a/chrome/browser/chromeos/login/helper.cc
+++ b/chrome/browser/chromeos/login/helper.cc
@@ -138,7 +138,7 @@ void NetworkStateHelper::GetConnectedWifiNetwork(std::string* out_onc_spec) {
if (!network_state)
return;
- scoped_ptr<base::DictionaryValue> current_onc =
+ std::unique_ptr<base::DictionaryValue> current_onc =
network_util::TranslateNetworkStateToONC(network_state);
std::string security;
current_onc->GetString(
@@ -148,7 +148,8 @@ void NetworkStateHelper::GetConnectedWifiNetwork(std::string* out_onc_spec) {
const std::string hex_ssid = network_state->GetHexSsid();
- scoped_ptr<base::DictionaryValue> copied_onc(new base::DictionaryValue());
+ std::unique_ptr<base::DictionaryValue> copied_onc(
+ new base::DictionaryValue());
copied_onc->Set(onc::toplevel_config::kType,
new base::StringValue(onc::network_type::kWiFi));
copied_onc->Set(onc::network_config::WifiProperty(onc::wifi::kHexSSID),
@@ -163,7 +164,7 @@ void NetworkStateHelper::CreateAndConnectNetworkFromOnc(
const base::Closure& success_callback,
const base::Closure& error_callback) const {
std::string error;
- scoped_ptr<base::Value> root = base::JSONReader::ReadAndReturnError(
+ std::unique_ptr<base::Value> root = base::JSONReader::ReadAndReturnError(
onc_spec, base::JSON_ALLOW_TRAILING_COMMAS, nullptr, &error);
base::DictionaryValue* toplevel_onc = nullptr;
@@ -213,7 +214,7 @@ void NetworkStateHelper::OnCreateConfiguration(
void NetworkStateHelper::OnCreateOrConnectNetworkFailed(
const base::Closure& error_callback,
const std::string& error_name,
- scoped_ptr<base::DictionaryValue> error_data) const {
+ std::unique_ptr<base::DictionaryValue> error_data) const {
LOG(ERROR) << "Failed to create or connect to network: " << error_name;
error_callback.Run();
}
« no previous file with comments | « chrome/browser/chromeos/login/helper.h ('k') | chrome/browser/chromeos/login/hid_detection_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698