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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc

Issue 1545283002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7
8 #include <algorithm> 7 #include <algorithm>
9 #include <stack> 8 #include <stack>
9 #include <utility>
10 10
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
16 #include "chrome/browser/sync_file_system/drive_backend/callback_helper.h" 16 #include "chrome/browser/sync_file_system/drive_backend/callback_helper.h"
17 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h" 17 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
18 #include "chrome/browser/sync_file_system/drive_backend/fake_drive_service_helpe r.h" 18 #include "chrome/browser/sync_file_system/drive_backend/fake_drive_service_helpe r.h"
19 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h" 19 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 base_dir_.path(), 126 base_dir_.path(),
127 nullptr, // task_logger 127 nullptr, // task_logger
128 nullptr, // notification_manager 128 nullptr, // notification_manager
129 nullptr, // extension_service 129 nullptr, // extension_service
130 nullptr, // signin_manager 130 nullptr, // signin_manager
131 nullptr, // token_service 131 nullptr, // token_service
132 nullptr, // request_context 132 nullptr, // request_context
133 nullptr, // drive_service 133 nullptr, // drive_service
134 in_memory_env_.get())); 134 in_memory_env_.get()));
135 remote_sync_service_->AddServiceObserver(this); 135 remote_sync_service_->AddServiceObserver(this);
136 remote_sync_service_->InitializeForTesting( 136 remote_sync_service_->InitializeForTesting(std::move(drive_service),
137 drive_service.Pass(), uploader.Pass(), nullptr /* sync_worker */); 137 std::move(uploader),
138 nullptr /* sync_worker */);
138 remote_sync_service_->SetSyncEnabled(true); 139 remote_sync_service_->SetSyncEnabled(true);
139 140
140 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); 141 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get());
141 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); 142 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get());
142 } 143 }
143 144
144 void TearDown() override { 145 void TearDown() override {
145 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; 146 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator;
146 for (iterator itr = file_systems_.begin(); 147 for (iterator itr = file_systems_.begin();
147 itr != file_systems_.end(); ++itr) { 148 itr != file_systems_.end(); ++itr) {
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 1724
1724 EXPECT_EQ(1u, CountApp()); 1725 EXPECT_EQ(1u, CountApp());
1725 EXPECT_EQ(1u, CountLocalFile(app_id)); 1726 EXPECT_EQ(1u, CountLocalFile(app_id));
1726 1727
1727 EXPECT_EQ(2u, CountMetadata()); 1728 EXPECT_EQ(2u, CountMetadata());
1728 EXPECT_EQ(2u, CountTracker()); 1729 EXPECT_EQ(2u, CountTracker());
1729 } 1730 }
1730 1731
1731 } // namespace drive_backend 1732 } // namespace drive_backend
1732 } // namespace sync_file_system 1733 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698