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

Side by Side Diff: chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc

Issue 1871713002: Convert //chrome/browser/extensions 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/memory/ptr_util.h"
12 #include "base/observer_list.h" 13 #include "base/observer_list.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele gate.h" 16 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele gate.h"
16 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele gate_factory.h" 17 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele gate_factory.h"
17 #include "chrome/browser/extensions/extension_apitest.h" 18 #include "chrome/browser/extensions/extension_apitest.h"
18 #include "chrome/common/extensions/api/passwords_private.h" 19 #include "chrome/common/extensions/api/passwords_private.h"
19 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
20 #include "components/keyed_service/core/keyed_service.h" 21 #include "components/keyed_service/core/keyed_service.h"
21 #include "content/public/test/test_utils.h" 22 #include "content/public/test/test_utils.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 class PasswordsPrivateApiTest : public ExtensionApiTest { 128 class PasswordsPrivateApiTest : public ExtensionApiTest {
128 public: 129 public:
129 PasswordsPrivateApiTest() { 130 PasswordsPrivateApiTest() {
130 if (!s_test_delegate_) { 131 if (!s_test_delegate_) {
131 s_test_delegate_ = new TestDelegate(); 132 s_test_delegate_ = new TestDelegate();
132 } 133 }
133 } 134 }
134 ~PasswordsPrivateApiTest() override {} 135 ~PasswordsPrivateApiTest() override {}
135 136
136 static scoped_ptr<KeyedService> GetPasswordsPrivateDelegate( 137 static std::unique_ptr<KeyedService> GetPasswordsPrivateDelegate(
137 content::BrowserContext* profile) { 138 content::BrowserContext* profile) {
138 CHECK(s_test_delegate_); 139 CHECK(s_test_delegate_);
139 return make_scoped_ptr(s_test_delegate_); 140 return base::WrapUnique(s_test_delegate_);
140 } 141 }
141 142
142 void SetUpCommandLine(base::CommandLine* command_line) override { 143 void SetUpCommandLine(base::CommandLine* command_line) override {
143 ExtensionApiTest::SetUpCommandLine(command_line); 144 ExtensionApiTest::SetUpCommandLine(command_line);
144 } 145 }
145 146
146 void SetUp() override { 147 void SetUp() override {
147 ExtensionApiTest::SetUp(); 148 ExtensionApiTest::SetUp();
148 } 149 }
149 150
(...skipping 28 matching lines...) Expand all
178 179
179 IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RemovePasswordException) { 180 IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RemovePasswordException) {
180 EXPECT_TRUE(RunPasswordsSubtest("removePasswordException")) << message_; 181 EXPECT_TRUE(RunPasswordsSubtest("removePasswordException")) << message_;
181 } 182 }
182 183
183 IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RequestPlaintextPassword) { 184 IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RequestPlaintextPassword) {
184 EXPECT_TRUE(RunPasswordsSubtest("requestPlaintextPassword")) << message_; 185 EXPECT_TRUE(RunPasswordsSubtest("requestPlaintextPassword")) << message_;
185 } 186 }
186 187
187 } // namespace extensions 188 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698