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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 // Get all origins that have pending changes. 616 // Get all origins that have pending changes.
617 std::deque<FileSystemURL> urls; 617 std::deque<FileSystemURL> urls;
618 (*tracker_ptr)->GetNextChangedURLs(&urls, 0); 618 (*tracker_ptr)->GetNextChangedURLs(&urls, 0);
619 for (std::deque<FileSystemURL>::iterator iter = urls.begin(); 619 for (std::deque<FileSystemURL>::iterator iter = urls.begin();
620 iter != urls.end(); ++iter) { 620 iter != urls.end(); ++iter) {
621 origins_with_changes->insert(iter->origin()); 621 origins_with_changes->insert(iter->origin());
622 } 622 }
623 623
624 // Creates snapshot directory. 624 // Creates snapshot directory.
625 file_util::CreateDirectory(local_base_path_.Append(kSnapshotDir)); 625 base::CreateDirectory(local_base_path_.Append(kSnapshotDir));
626 626
627 return status; 627 return status;
628 } 628 }
629 629
630 void LocalFileSyncContext::DidInitializeChangeTrackerOnIOThread( 630 void LocalFileSyncContext::DidInitializeChangeTrackerOnIOThread(
631 scoped_ptr<LocalFileChangeTracker>* tracker_ptr, 631 scoped_ptr<LocalFileChangeTracker>* tracker_ptr,
632 const GURL& source_url, 632 const GURL& source_url,
633 FileSystemContext* file_system_context, 633 FileSystemContext* file_system_context,
634 std::set<GURL>* origins_with_changes, 634 std::set<GURL>* origins_with_changes,
635 SyncStatusCode status) { 635 SyncStatusCode status) {
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 return; 930 return;
931 } 931 }
932 932
933 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync( 933 FileSystemURL url_for_sync = CreateSyncableFileSystemURLForSync(
934 file_system_context, dest_url); 934 file_system_context, dest_url);
935 file_system_context->operation_runner()->CopyInForeignFile( 935 file_system_context->operation_runner()->CopyInForeignFile(
936 local_path, url_for_sync, callback); 936 local_path, url_for_sync, callback);
937 } 937 }
938 938
939 } // namespace sync_file_system 939 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698