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

Side by Side Diff: extensions/browser/api/system_storage/system_storage_apitest.cc

Issue 1902873002: Convert //extensions/browser/api 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <vector> 7 #include <vector>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 StorageMonitor::GetInstance()->receiver()->ProcessAttach( 95 StorageMonitor::GetInstance()->receiver()->ProcessAttach(
96 extensions::test::BuildStorageInfoFromTestStorageUnitInfo( 96 extensions::test::BuildStorageInfoFromTestStorageUnitInfo(
97 removable_storage_info)); 97 removable_storage_info));
98 } 98 }
99 99
100 void DetachRemovableStorage(const std::string& id) { 100 void DetachRemovableStorage(const std::string& id) {
101 StorageMonitor::GetInstance()->receiver()->ProcessDetach(id); 101 StorageMonitor::GetInstance()->receiver()->ProcessDetach(id);
102 } 102 }
103 103
104 private: 104 private:
105 scoped_ptr<base::MessageLoop> message_loop_; 105 std::unique_ptr<base::MessageLoop> message_loop_;
106 }; 106 };
107 107
108 IN_PROC_BROWSER_TEST_F(SystemStorageApiTest, Storage) { 108 IN_PROC_BROWSER_TEST_F(SystemStorageApiTest, Storage) {
109 SetUpAllMockStorageDevices(); 109 SetUpAllMockStorageDevices();
110 TestStorageInfoProvider* provider = 110 TestStorageInfoProvider* provider =
111 new TestStorageInfoProvider(kTestingData, arraysize(kTestingData)); 111 new TestStorageInfoProvider(kTestingData, arraysize(kTestingData));
112 extensions::StorageInfoProvider::InitializeForTesting(provider); 112 extensions::StorageInfoProvider::InitializeForTesting(provider);
113 std::vector<linked_ptr<ExtensionTestMessageListener>> device_ids_listeners; 113 std::vector<linked_ptr<ExtensionTestMessageListener>> device_ids_listeners;
114 for (size_t i = 0; i < arraysize(kTestingData); ++i) { 114 for (size_t i = 0; i < arraysize(kTestingData); ++i) {
115 linked_ptr<ExtensionTestMessageListener> listener( 115 linked_ptr<ExtensionTestMessageListener> listener(
(...skipping 26 matching lines...) Expand all
142 removable_storage_transient_id, false); 142 removable_storage_transient_id, false);
143 143
144 // Simulate triggering onDetached event. 144 // Simulate triggering onDetached event.
145 ASSERT_TRUE(detach_listener.WaitUntilSatisfied()); 145 ASSERT_TRUE(detach_listener.WaitUntilSatisfied());
146 DetachRemovableStorage(kRemovableStorageData.device_id); 146 DetachRemovableStorage(kRemovableStorageData.device_id);
147 147
148 ASSERT_TRUE(detach_device_id_listener.WaitUntilSatisfied()); 148 ASSERT_TRUE(detach_device_id_listener.WaitUntilSatisfied());
149 149
150 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 150 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
151 } 151 }
OLDNEW
« no previous file with comments | « extensions/browser/api/system_storage/system_storage_api.cc ('k') | extensions/browser/api/test/test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698