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

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

Issue 23856002: SyncFS: Support resolveLocalFileSystemURL on SyncFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/location.h" 8 #include "base/location.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 void LocalFileSyncContext::InitializeFileSystemContextOnIOThread( 489 void LocalFileSyncContext::InitializeFileSystemContextOnIOThread(
490 const GURL& source_url, 490 const GURL& source_url,
491 FileSystemContext* file_system_context) { 491 FileSystemContext* file_system_context) {
492 DCHECK(io_task_runner_->RunsTasksOnCurrentThread()); 492 DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
493 DCHECK(file_system_context); 493 DCHECK(file_system_context);
494 SyncFileSystemBackend* backend = 494 SyncFileSystemBackend* backend =
495 SyncFileSystemBackend::GetBackend(file_system_context); 495 SyncFileSystemBackend::GetBackend(file_system_context);
496 DCHECK(backend); 496 DCHECK(backend);
497 if (!backend->change_tracker()) { 497 if (!backend->change_tracker()) {
498 // First registers the service name.
499 RegisterSyncableFileSystem();
500 // Create and initialize LocalFileChangeTracker and call back this method 498 // Create and initialize LocalFileChangeTracker and call back this method
501 // later again. 499 // later again.
502 std::set<GURL>* origins_with_changes = new std::set<GURL>; 500 std::set<GURL>* origins_with_changes = new std::set<GURL>;
503 scoped_ptr<LocalFileChangeTracker>* tracker_ptr( 501 scoped_ptr<LocalFileChangeTracker>* tracker_ptr(
504 new scoped_ptr<LocalFileChangeTracker>); 502 new scoped_ptr<LocalFileChangeTracker>);
505 base::PostTaskAndReplyWithResult( 503 base::PostTaskAndReplyWithResult(
506 file_system_context->default_file_task_runner(), 504 file_system_context->default_file_task_runner(),
507 FROM_HERE, 505 FROM_HERE,
508 base::Bind(&LocalFileSyncContext::InitializeChangeTrackerOnFileThread, 506 base::Bind(&LocalFileSyncContext::InitializeChangeTrackerOnFileThread,
509 this, tracker_ptr, 507 this, tracker_ptr,
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 return; 825 return;
828 } 826 }
829 827
830 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync( 828 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync(
831 file_system_context, dest_url); 829 file_system_context, dest_url);
832 file_system_context->operation_runner()->CopyInForeignFile( 830 file_system_context->operation_runner()->CopyInForeignFile(
833 local_path, url_for_sync, callback); 831 local_path, url_for_sync, callback);
834 } 832 }
835 833
836 } // namespace sync_file_system 834 } // 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