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

Unified Diff: google_apis/gaia/google_service_auth_error_unittest.cc

Issue 1873663002: Convert //google_apis from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: google_apis/gaia/google_service_auth_error_unittest.cc
diff --git a/google_apis/gaia/google_service_auth_error_unittest.cc b/google_apis/gaia/google_service_auth_error_unittest.cc
index 8e221cc631a2113ca772b751d735b65798b2b7b8..2fec3ead4d093d029684e3893e3ac3d79a31d751 100644
--- a/google_apis/gaia/google_service_auth_error_unittest.cc
+++ b/google_apis/gaia/google_service_auth_error_unittest.cc
@@ -4,9 +4,9 @@
#include "google_apis/gaia/google_service_auth_error.h"
+#include <memory>
#include <string>
-#include "base/memory/scoped_ptr.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
#include "net/base/net_errors.h"
@@ -20,7 +20,7 @@ class GoogleServiceAuthErrorTest : public testing::Test {};
void TestSimpleState(GoogleServiceAuthError::State state) {
GoogleServiceAuthError error(state);
- scoped_ptr<base::DictionaryValue> value(error.ToValue());
+ std::unique_ptr<base::DictionaryValue> value(error.ToValue());
EXPECT_EQ(1u, value->size());
std::string state_str;
EXPECT_TRUE(value->GetString("state", &state_str));
@@ -38,7 +38,7 @@ TEST_F(GoogleServiceAuthErrorTest, SimpleToValue) {
TEST_F(GoogleServiceAuthErrorTest, None) {
GoogleServiceAuthError error(GoogleServiceAuthError::AuthErrorNone());
- scoped_ptr<base::DictionaryValue> value(error.ToValue());
+ std::unique_ptr<base::DictionaryValue> value(error.ToValue());
EXPECT_EQ(1u, value->size());
ExpectDictStringValue("NONE", *value, "state");
}
@@ -46,7 +46,7 @@ TEST_F(GoogleServiceAuthErrorTest, None) {
TEST_F(GoogleServiceAuthErrorTest, ConnectionFailed) {
GoogleServiceAuthError error(
GoogleServiceAuthError::FromConnectionError(net::OK));
- scoped_ptr<base::DictionaryValue> value(error.ToValue());
+ std::unique_ptr<base::DictionaryValue> value(error.ToValue());
EXPECT_EQ(2u, value->size());
ExpectDictStringValue("CONNECTION_FAILED", *value, "state");
ExpectDictStringValue("net::OK", *value, "networkError");

Powered by Google App Engine
This is Rietveld 408576698