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

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

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
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/local/local_file_change_tracker.h" 5 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 const SyncStatusCode status = tracker_db_->GetDirtyEntries(&dirty_files); 329 const SyncStatusCode status = tracker_db_->GetDirtyEntries(&dirty_files);
330 if (status != SYNC_STATUS_OK) 330 if (status != SYNC_STATUS_OK)
331 return status; 331 return status;
332 332
333 FileSystemFileUtil* file_util = 333 FileSystemFileUtil* file_util =
334 file_system_context->sandbox_delegate()->sync_file_util(); 334 file_system_context->sandbox_delegate()->sync_file_util();
335 DCHECK(file_util); 335 DCHECK(file_util);
336 scoped_ptr<FileSystemOperationContext> context( 336 scoped_ptr<FileSystemOperationContext> context(
337 new FileSystemOperationContext(file_system_context)); 337 new FileSystemOperationContext(file_system_context));
338 338
339 base::PlatformFileInfo file_info; 339 base::File::Info file_info;
340 base::FilePath platform_path; 340 base::FilePath platform_path;
341 341
342 while (!dirty_files.empty()) { 342 while (!dirty_files.empty()) {
343 const FileSystemURL url = dirty_files.front(); 343 const FileSystemURL url = dirty_files.front();
344 dirty_files.pop(); 344 dirty_files.pop();
345 DCHECK_EQ(url.type(), fileapi::kFileSystemTypeSyncable); 345 DCHECK_EQ(url.type(), fileapi::kFileSystemTypeSyncable);
346 346
347 switch (file_util->GetFileInfo(context.get(), url, 347 switch (file_util->GetFileInfo(context.get(), url,
348 &file_info, &platform_path)) { 348 &file_info, &platform_path)) {
349 case base::PLATFORM_FILE_OK: { 349 case base::PLATFORM_FILE_OK: {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!status.ok() && !status.IsNotFound()) { 564 if (!status.ok() && !status.IsNotFound()) {
565 HandleError(FROM_HERE, status); 565 HandleError(FROM_HERE, status);
566 db_status_ = LevelDBStatusToSyncStatusCode(status); 566 db_status_ = LevelDBStatusToSyncStatusCode(status);
567 db_.reset(); 567 db_.reset();
568 return db_status_; 568 return db_status_;
569 } 569 }
570 return SYNC_STATUS_OK; 570 return SYNC_STATUS_OK;
571 } 571 }
572 572
573 } // namespace sync_file_system 573 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698