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

Side by Side Diff: chrome/browser/extensions/extension_garbage_collector_chromeos_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_garbage_collector_chromeos.h" 5 #include "chrome/browser/extensions/extension_garbage_collector_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ExtensionPrefs* GetExtensionPrefs() { 136 ExtensionPrefs* GetExtensionPrefs() {
137 return ExtensionPrefs::Get(profile_.get()); 137 return ExtensionPrefs::Get(profile_.get());
138 } 138 }
139 139
140 chromeos::FakeChromeUserManager* GetFakeUserManager() { 140 chromeos::FakeChromeUserManager* GetFakeUserManager() {
141 return static_cast<chromeos::FakeChromeUserManager*>( 141 return static_cast<chromeos::FakeChromeUserManager*>(
142 user_manager::UserManager::Get()); 142 user_manager::UserManager::Get());
143 } 143 }
144 144
145 private: 145 private:
146 scoped_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_; 146 std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
147 base::ScopedTempDir cache_dir_; 147 base::ScopedTempDir cache_dir_;
148 }; 148 };
149 149
150 // Test shared extensions clean up. 150 // Test shared extensions clean up.
151 TEST_F(ExtensionGarbageCollectorChromeOSUnitTest, SharedExtensions) { 151 TEST_F(ExtensionGarbageCollectorChromeOSUnitTest, SharedExtensions) {
152 // Version for non-existing user. 152 // Version for non-existing user.
153 base::FilePath path_id1_1 = CreateSharedExtensionDir( 153 base::FilePath path_id1_1 = CreateSharedExtensionDir(
154 kExtensionId1, "1.0", cache_dir()); 154 kExtensionId1, "1.0", cache_dir());
155 CreateSharedExtensionPrefs(kExtensionId1, "1.0", "test@test.com", path_id1_1); 155 CreateSharedExtensionPrefs(kExtensionId1, "1.0", "test@test.com", path_id1_1);
156 EXPECT_TRUE(base::PathExists(path_id1_1)); 156 EXPECT_TRUE(base::PathExists(path_id1_1));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 190
191 const base::DictionaryValue* shared_extensions = testing_local_state_.Get()-> 191 const base::DictionaryValue* shared_extensions = testing_local_state_.Get()->
192 GetDictionary(ExtensionAssetsManagerChromeOS::kSharedExtensions); 192 GetDictionary(ExtensionAssetsManagerChromeOS::kSharedExtensions);
193 ASSERT_TRUE(shared_extensions); 193 ASSERT_TRUE(shared_extensions);
194 194
195 EXPECT_FALSE(shared_extensions->HasKey(kExtensionId1)); 195 EXPECT_FALSE(shared_extensions->HasKey(kExtensionId1));
196 EXPECT_TRUE(shared_extensions->HasKey(kExtensionId2)); 196 EXPECT_TRUE(shared_extensions->HasKey(kExtensionId2));
197 } 197 }
198 198
199 } // namespace extensions 199 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698