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

Side by Side Diff: chrome/browser/sync_file_system/local/local_file_sync_service_unittest.cc

Issue 1873683002: Convert //chrome/browser/sync_file_system 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return sync_status; 193 return sync_status;
194 } 194 }
195 195
196 int64_t GetNumChangesInTracker() const { 196 int64_t GetNumChangesInTracker() const {
197 return file_system_->backend()->change_tracker()->num_changes(); 197 return file_system_->backend()->change_tracker()->num_changes();
198 } 198 }
199 199
200 content::TestBrowserThreadBundle thread_bundle_; 200 content::TestBrowserThreadBundle thread_bundle_;
201 201
202 base::ScopedTempDir temp_dir_; 202 base::ScopedTempDir temp_dir_;
203 scoped_ptr<leveldb::Env> in_memory_env_; 203 std::unique_ptr<leveldb::Env> in_memory_env_;
204 TestingProfile profile_; 204 TestingProfile profile_;
205 205
206 scoped_ptr<CannedSyncableFileSystem> file_system_; 206 std::unique_ptr<CannedSyncableFileSystem> file_system_;
207 scoped_ptr<LocalFileSyncService> local_service_; 207 std::unique_ptr<LocalFileSyncService> local_service_;
208 208
209 int64_t num_changes_; 209 int64_t num_changes_;
210 }; 210 };
211 211
212 // More complete tests for PrepareForProcessRemoteChange and ApplyRemoteChange 212 // More complete tests for PrepareForProcessRemoteChange and ApplyRemoteChange
213 // are also in content_unittest:LocalFileSyncContextTest. 213 // are also in content_unittest:LocalFileSyncContextTest.
214 TEST_F(LocalFileSyncServiceTest, RemoteSyncStepsSimple) { 214 TEST_F(LocalFileSyncServiceTest, RemoteSyncStepsSimple) {
215 const FileSystemURL kFile(file_system_->URL("file")); 215 const FileSystemURL kFile(file_system_->URL("file"));
216 const FileSystemURL kDir(file_system_->URL("dir")); 216 const FileSystemURL kDir(file_system_->URL("dir"));
217 const char kTestFileData[] = "0123456789"; 217 const char kTestFileData[] = "0123456789";
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 all_origins.insert(kOrigin2); 727 all_origins.insert(kOrigin2);
728 all_origins.insert(kOrigin3); 728 all_origins.insert(kOrigin3);
729 while (!all_origins.empty()) { 729 while (!all_origins.empty()) {
730 ASSERT_TRUE(NextOriginToProcess(&origin)); 730 ASSERT_TRUE(NextOriginToProcess(&origin));
731 ASSERT_TRUE(ContainsKey(all_origins, origin)); 731 ASSERT_TRUE(ContainsKey(all_origins, origin));
732 all_origins.erase(origin); 732 all_origins.erase(origin);
733 } 733 }
734 } 734 }
735 735
736 } // namespace sync_file_system 736 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698