Remove final uses of scoped_ptr in src and crypto
These are preventing us from getting rid of the epatched header
in the libchrome ebuild.
BUG=None
TEST=emerge-{arkham, whirlwind} libweave
Change-Id: Ief89a674886da24a9c98982aa4e0c4dc02be0d4a
Reviewed-on: https://weave-review.googlesource.com/8775
Reviewed-by: Ben Chan <benchan@google.com>
diff --git a/src/config.cc b/src/config.cc
index 7d4db0b..a3f2c54 100644
--- a/src/config.cc
+++ b/src/config.cc
@@ -12,7 +12,6 @@
#include <base/json/json_reader.h>
#include <base/json/json_writer.h>
#include <base/logging.h>
-#include <base/memory/scoped_ptr.h>
#include <base/strings/string_number_conversions.h>
#include <base/values.h>
#include <weave/enum_to_string.h>
@@ -57,7 +56,7 @@
std::string cloud_id;
if (dict->GetString(config_keys::kCloudId, &cloud_id) && !cloud_id.empty())
return;
- scoped_ptr<base::Value> tmp;
+ std::unique_ptr<base::Value> tmp;
if (dict->Remove(config_keys::kDeviceId, &tmp))
dict->Set(config_keys::kCloudId, std::move(tmp));
}
diff --git a/src/device_registration_info.cc b/src/device_registration_info.cc
index 8055363..3177a7d 100644
--- a/src/device_registration_info.cc
+++ b/src/device_registration_info.cc
@@ -225,7 +225,7 @@
"Response is not a valid JSON object: '%s'", json.c_str());
return std::unique_ptr<base::DictionaryValue>();
} else {
- // |value| is now owned by |dict_value|, so release the scoped_ptr now.
+ // |value| is now owned by |dict_value|, so release the unique_ptr now.
base::IgnoreResult(value.release());
}
return std::unique_ptr<base::DictionaryValue>(dict_value);
diff --git a/third_party/chromium/crypto/sha2.cc b/third_party/chromium/crypto/sha2.cc
index 7dcef0b..1ab3fe1 100644
--- a/third_party/chromium/crypto/sha2.cc
+++ b/third_party/chromium/crypto/sha2.cc
@@ -7,8 +7,6 @@
#include <algorithm>
#include <openssl/sha.h>
-#include <base/memory/scoped_ptr.h>
-
namespace crypto {
void SHA256HashString(const std::string& str, uint8_t* output, size_t len) {