| OLD | NEW | 
|---|
| 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/root_delete_helper.h" | 5 #include "chrome/browser/sync_file_system/local/root_delete_helper.h" | 
| 6 | 6 | 
| 7 #include "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" | 
| 8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 8 #include "chrome/browser/sync_file_system/local/local_file_change_tracker.h" | 
| 9 #include "chrome/browser/sync_file_system/local/local_file_sync_status.h" | 9 #include "chrome/browser/sync_file_system/local/local_file_sync_status.h" | 
| 10 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 10 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 49   DCHECK(!callback_.is_null()); | 49   DCHECK(!callback_.is_null()); | 
| 50   DCHECK(sync_status_); | 50   DCHECK(sync_status_); | 
| 51   // This is expected to run on the filesystem root. | 51   // This is expected to run on the filesystem root. | 
| 52   DCHECK(fileapi::VirtualPath::IsRootPath(url.path())); | 52   DCHECK(fileapi::VirtualPath::IsRootPath(url.path())); | 
| 53 } | 53 } | 
| 54 | 54 | 
| 55 RootDeleteHelper::~RootDeleteHelper() { | 55 RootDeleteHelper::~RootDeleteHelper() { | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 void RootDeleteHelper::Run() { | 58 void RootDeleteHelper::Run() { | 
| 59   util::Log(logging::LOG_INFO, FROM_HERE, | 59   util::Log(logging::LOG_VERBOSE, FROM_HERE, | 
| 60             "Deleting the entire local filesystem for remote root deletion: " | 60             "Deleting the entire local filesystem for remote root deletion: " | 
| 61             "%s", url_.DebugString().c_str()); | 61             "%s", url_.DebugString().c_str()); | 
| 62 | 62 | 
| 63   file_system_context_->DeleteFileSystem( | 63   file_system_context_->DeleteFileSystem( | 
| 64       url_.origin(), url_.type(), | 64       url_.origin(), url_.type(), | 
| 65       base::Bind(&RootDeleteHelper::DidDeleteFileSystem, | 65       base::Bind(&RootDeleteHelper::DidDeleteFileSystem, | 
| 66                  weak_factory_.GetWeakPtr())); | 66                  weak_factory_.GetWeakPtr())); | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 void RootDeleteHelper::DidDeleteFileSystem(base::File::Error error) { | 69 void RootDeleteHelper::DidDeleteFileSystem(base::File::Error error) { | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 96 } | 96 } | 
| 97 | 97 | 
| 98 void RootDeleteHelper::DidOpenFileSystem(const GURL& /* root */, | 98 void RootDeleteHelper::DidOpenFileSystem(const GURL& /* root */, | 
| 99                                          const std::string& /* name */, | 99                                          const std::string& /* name */, | 
| 100                                          base::File::Error error) { | 100                                          base::File::Error error) { | 
| 101   FileStatusCallback callback = callback_; | 101   FileStatusCallback callback = callback_; | 
| 102   callback.Run(error); | 102   callback.Run(error); | 
| 103 } | 103 } | 
| 104 | 104 | 
| 105 }  // namespace sync_file_system | 105 }  // namespace sync_file_system | 
| OLD | NEW | 
|---|