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

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

Issue 23526076: [Retry] SyncFS: Support resolveLocalFileSystemURL on SyncFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/local/sync_file_system_backend.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_sync_context.h" 5 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 500
501 void LocalFileSyncContext::InitializeFileSystemContextOnIOThread( 501 void LocalFileSyncContext::InitializeFileSystemContextOnIOThread(
502 const GURL& source_url, 502 const GURL& source_url,
503 FileSystemContext* file_system_context) { 503 FileSystemContext* file_system_context) {
504 DCHECK(io_task_runner_->RunsTasksOnCurrentThread()); 504 DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
505 DCHECK(file_system_context); 505 DCHECK(file_system_context);
506 SyncFileSystemBackend* backend = 506 SyncFileSystemBackend* backend =
507 SyncFileSystemBackend::GetBackend(file_system_context); 507 SyncFileSystemBackend::GetBackend(file_system_context);
508 DCHECK(backend); 508 DCHECK(backend);
509 if (!backend->change_tracker()) { 509 if (!backend->change_tracker()) {
510 // First registers the service name.
511 RegisterSyncableFileSystem();
512 // Create and initialize LocalFileChangeTracker and call back this method 510 // Create and initialize LocalFileChangeTracker and call back this method
513 // later again. 511 // later again.
514 std::set<GURL>* origins_with_changes = new std::set<GURL>; 512 std::set<GURL>* origins_with_changes = new std::set<GURL>;
515 scoped_ptr<LocalFileChangeTracker>* tracker_ptr( 513 scoped_ptr<LocalFileChangeTracker>* tracker_ptr(
516 new scoped_ptr<LocalFileChangeTracker>); 514 new scoped_ptr<LocalFileChangeTracker>);
517 base::PostTaskAndReplyWithResult( 515 base::PostTaskAndReplyWithResult(
518 file_system_context->default_file_task_runner(), 516 file_system_context->default_file_task_runner(),
519 FROM_HERE, 517 FROM_HERE,
520 base::Bind(&LocalFileSyncContext::InitializeChangeTrackerOnFileThread, 518 base::Bind(&LocalFileSyncContext::InitializeChangeTrackerOnFileThread,
521 this, tracker_ptr, 519 this, tracker_ptr,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 return; 870 return;
873 } 871 }
874 872
875 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync( 873 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync(
876 file_system_context, dest_url); 874 file_system_context, dest_url);
877 file_system_context->operation_runner()->CopyInForeignFile( 875 file_system_context->operation_runner()->CopyInForeignFile(
878 local_path, url_for_sync, callback); 876 local_path, url_for_sync, callback);
879 } 877 }
880 878
881 } // namespace sync_file_system 879 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/local/sync_file_system_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698