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

Side by Side Diff: webkit/browser/fileapi/syncable/local_file_change_tracker.cc

Issue 16109008: Cleanup: Deprecate DriveFileSyncService::kServiceName (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 "webkit/browser/fileapi/syncable/local_file_change_tracker.h" 5 #include "webkit/browser/fileapi/syncable/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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 RecordChange(url, FileChange( 243 RecordChange(url, FileChange(
244 FileChange::FILE_CHANGE_ADD_OR_UPDATE, 244 FileChange::FILE_CHANGE_ADD_OR_UPDATE,
245 SYNC_FILE_TYPE_DIRECTORY)); 245 SYNC_FILE_TYPE_DIRECTORY));
246 246
247 // Push files and directories in this directory into |dirty_files|. 247 // Push files and directories in this directory into |dirty_files|.
248 scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator( 248 scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator(
249 file_util->CreateFileEnumerator(context.get(), url)); 249 file_util->CreateFileEnumerator(context.get(), url));
250 base::FilePath path_each; 250 base::FilePath path_each;
251 while (!(path_each = enumerator->Next()).empty()) { 251 while (!(path_each = enumerator->Next()).empty()) {
252 dirty_files.push(CreateSyncableFileSystemURL( 252 dirty_files.push(CreateSyncableFileSystemURL(
253 url.origin(), url.filesystem_id(), path_each)); 253 url.origin(), path_each));
254 } 254 }
255 break; 255 break;
256 } 256 }
257 case base::PLATFORM_FILE_ERROR_NOT_FOUND: { 257 case base::PLATFORM_FILE_ERROR_NOT_FOUND: {
258 // File represented by |url| has already been deleted. Since we cannot 258 // File represented by |url| has already been deleted. Since we cannot
259 // figure out if this file was directory or not from the URL, file 259 // figure out if this file was directory or not from the URL, file
260 // type is treated as SYNC_FILE_TYPE_UNKNOWN. 260 // type is treated as SYNC_FILE_TYPE_UNKNOWN.
261 // 261 //
262 // NOTE: Directory to have been reverted (that is, ADD -> DELETE) is 262 // NOTE: Directory to have been reverted (that is, ADD -> DELETE) is
263 // also treated as FILE_CHANGE_DELETE. 263 // also treated as FILE_CHANGE_DELETE.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 db_.reset(); 417 db_.reset();
418 return db_status_; 418 return db_status_;
419 } 419 }
420 dirty_files->push(url); 420 dirty_files->push(url);
421 iter->Next(); 421 iter->Next();
422 } 422 }
423 return SYNC_STATUS_OK; 423 return SYNC_STATUS_OK;
424 } 424 }
425 425
426 } // namespace sync_file_system 426 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698