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

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

Issue 881723002: Remove google_apis::ResourceEntry and related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 "chrome/browser/sync_file_system/drive_backend/register_app_task.h" 5 #include "chrome/browser/sync_file_system/drive_backend/register_app_task.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 bool IsAppRegistered(const std::string& app_id) { 194 bool IsAppRegistered(const std::string& app_id) {
195 TrackerIDSet trackers; 195 TrackerIDSet trackers;
196 if (!context_->GetMetadataDatabase()->FindTrackersByParentAndTitle( 196 if (!context_->GetMetadataDatabase()->FindTrackersByParentAndTitle(
197 kSyncRootTrackerID, app_id, &trackers)) 197 kSyncRootTrackerID, app_id, &trackers))
198 return false; 198 return false;
199 return trackers.has_active(); 199 return trackers.has_active();
200 } 200 }
201 201
202 size_t CountRemoteFileInSyncRoot() { 202 size_t CountRemoteFileInSyncRoot() {
203 ScopedVector<google_apis::ResourceEntry> files; 203 ScopedVector<google_apis::FileResource> files;
204 EXPECT_EQ(google_apis::HTTP_SUCCESS, 204 EXPECT_EQ(google_apis::HTTP_SUCCESS,
205 fake_drive_service_helper_->ListFilesInFolder( 205 fake_drive_service_helper_->ListFilesInFolder(
206 sync_root_folder_id_, &files)); 206 sync_root_folder_id_, &files));
207 return files.size(); 207 return files.size();
208 } 208 }
209 209
210 bool HasRemoteAppRoot(const std::string& app_id) { 210 bool HasRemoteAppRoot(const std::string& app_id) {
211 TrackerIDSet files; 211 TrackerIDSet files;
212 if (!context_->GetMetadataDatabase()->FindTrackersByParentAndTitle( 212 if (!context_->GetMetadataDatabase()->FindTrackersByParentAndTitle(
213 kSyncRootTrackerID, app_id, &files) || 213 kSyncRootTrackerID, app_id, &files) ||
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 CreateMetadataDatabase(db.Pass()); 305 CreateMetadataDatabase(db.Pass());
306 RunRegisterAppTask(kAppID); 306 RunRegisterAppTask(kAppID);
307 307
308 EXPECT_EQ(1u, CountRegisteredAppRoot()); 308 EXPECT_EQ(1u, CountRegisteredAppRoot());
309 EXPECT_TRUE(IsAppRegistered(kAppID)); 309 EXPECT_TRUE(IsAppRegistered(kAppID));
310 } 310 }
311 311
312 } // namespace drive_backend 312 } // namespace drive_backend
313 } // namespace sync_file_system 313 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer_unittest.cc ('k') | google_apis/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698