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

Unified Diff: extensions/shell/browser/api/identity/identity_api_unittest.cc

Issue 1908953003: Convert //extensions/{common,shell} 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
Index: extensions/shell/browser/api/identity/identity_api_unittest.cc
diff --git a/extensions/shell/browser/api/identity/identity_api_unittest.cc b/extensions/shell/browser/api/identity/identity_api_unittest.cc
index 0af6e4b13bbb46a23cfce6bb9bf41aae453fe5a7..122b979636e086b48c96052de1f3dfc46d5ecf7e 100644
--- a/extensions/shell/browser/api/identity/identity_api_unittest.cc
+++ b/extensions/shell/browser/api/identity/identity_api_unittest.cc
@@ -4,10 +4,10 @@
#include "extensions/shell/browser/api/identity/identity_api.h"
+#include <memory>
#include <string>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/browser/api_unittest.h"
@@ -26,9 +26,9 @@ class MockShellOAuth2TokenService : public ShellOAuth2TokenService {
~MockShellOAuth2TokenService() override {}
// OAuth2TokenService:
- scoped_ptr<Request> StartRequest(const std::string& account_id,
- const ScopeSet& scopes,
- Consumer* consumer) override {
+ std::unique_ptr<Request> StartRequest(const std::string& account_id,
+ const ScopeSet& scopes,
+ Consumer* consumer) override {
// Immediately return success.
consumer->OnGetTokenSuccess(nullptr, "logged-in-user-token", base::Time());
return nullptr;
@@ -108,7 +108,8 @@ TEST_F(IdentityApiTest, GetAuthToken) {
function->SetMintTokenFlowForTesting(new MockOAuth2MintTokenFlow(function));
// Function succeeds and returns a token (for its callback).
- scoped_ptr<base::Value> result = RunFunctionAndReturnValue(function, "[{}]");
+ std::unique_ptr<base::Value> result =
+ RunFunctionAndReturnValue(function, "[{}]");
ASSERT_TRUE(result.get());
std::string value;
result->GetAsString(&value);
@@ -122,7 +123,7 @@ TEST_F(IdentityApiTest, RemoveCachedAuthToken) {
MockShellOAuth2TokenService token_service;
// Function succeeds and returns nothing (for its callback).
- scoped_ptr<base::Value> result = RunFunctionAndReturnValue(
+ std::unique_ptr<base::Value> result = RunFunctionAndReturnValue(
new IdentityRemoveCachedAuthTokenFunction, "[{}]");
EXPECT_FALSE(result.get());
}
« no previous file with comments | « extensions/shell/browser/api/identity/identity_api.cc ('k') | extensions/shell/browser/media_capture_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698