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

Side by Side Diff: chrome/browser/extensions/api/file_system/file_system_api_unittest.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: Rebase and fix header 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/file_system/file_system_api.h" 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 void TearDown() override { 171 void TearDown() override {
172 scoped_user_manager_enabler_.reset(); 172 scoped_user_manager_enabler_.reset();
173 user_manager_ = nullptr; 173 user_manager_ = nullptr;
174 testing_pref_service_.reset(); 174 testing_pref_service_.reset();
175 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr); 175 TestingBrowserProcess::GetGlobal()->SetLocalState(nullptr);
176 } 176 }
177 177
178 protected: 178 protected:
179 base::WeakPtr<Volume> volume_; 179 base::WeakPtr<Volume> volume_;
180 scoped_ptr<TestingPrefServiceSimple> testing_pref_service_; 180 std::unique_ptr<TestingPrefServiceSimple> testing_pref_service_;
181 chromeos::FakeChromeUserManager* 181 chromeos::FakeChromeUserManager*
182 user_manager_; // Owned by the scope enabler. 182 user_manager_; // Owned by the scope enabler.
183 scoped_ptr<chromeos::ScopedUserManagerEnabler> scoped_user_manager_enabler_; 183 std::unique_ptr<chromeos::ScopedUserManagerEnabler>
184 scoped_user_manager_enabler_;
184 content::TestBrowserThreadBundle thread_bundle_; 185 content::TestBrowserThreadBundle thread_bundle_;
185 }; 186 };
186 #endif 187 #endif
187 188
188 TEST(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) { 189 TEST(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
189 // AcceptsAllTypes is ignored when no other extensions are available. 190 // AcceptsAllTypes is ignored when no other extensions are available.
190 ui::SelectFileDialog::FileTypeInfo file_type_info; 191 ui::SelectFileDialog::FileTypeInfo file_type_info;
191 bool acceptsAllTypes = false; 192 bool acceptsAllTypes = false;
192 FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info, 193 FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
193 base::FilePath::StringType(), NULL, &acceptsAllTypes); 194 base::FilePath::StringType(), NULL, &acceptsAllTypes);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 base::RunLoop().RunUntilIdle(); 433 base::RunLoop().RunUntilIdle();
433 434
434 EXPECT_EQ(1, delegate.show_dialog_counter()); 435 EXPECT_EQ(1, delegate.show_dialog_counter());
435 EXPECT_EQ(0, delegate.show_notification_counter()); 436 EXPECT_EQ(0, delegate.show_notification_counter());
436 EXPECT_EQ(ConsentProvider::CONSENT_REJECTED, result); 437 EXPECT_EQ(ConsentProvider::CONSENT_REJECTED, result);
437 } 438 }
438 } 439 }
439 #endif 440 #endif
440 441
441 } // namespace extensions 442 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698