| Index: extensions/browser/api/file_handlers/directory_util.cc
|
| diff --git a/chrome/browser/extensions/api/file_handlers/directory_util.cc b/extensions/browser/api/file_handlers/directory_util.cc
|
| similarity index 87%
|
| rename from chrome/browser/extensions/api/file_handlers/directory_util.cc
|
| rename to extensions/browser/api/file_handlers/directory_util.cc
|
| index c01951efe3999586e036dda34eede54122c9a158..516be8f872be520002cb7a3ed3678644bfceda2d 100644
|
| --- a/chrome/browser/extensions/api/file_handlers/directory_util.cc
|
| +++ b/extensions/browser/api/file_handlers/directory_util.cc
|
| @@ -2,12 +2,12 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/extensions/api/file_handlers/directory_util.h"
|
| +#include "extensions/browser/api/file_handlers/directory_util.h"
|
|
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| -#include "chrome/browser/profiles/profile.h"
|
| +#include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "net/base/filename_util.h"
|
| #include "storage/browser/fileapi/file_system_url.h"
|
| @@ -37,14 +37,14 @@ void OnGetIsDirectoryFromFileInfoCompleted(
|
| // The callback parameter contains the result and is required to support
|
| // both native local directories to avoid UI thread and non native local
|
| // path directories for the IsNonNativeLocalPathDirectory API.
|
| -void EntryIsDirectory(Profile* profile,
|
| +void EntryIsDirectory(content::BrowserContext* context,
|
| const base::FilePath& path,
|
| const base::Callback<void(bool)>& callback) {
|
| #if defined(OS_CHROMEOS)
|
| NonNativeFileSystemDelegate* delegate =
|
| ExtensionsAPIClient::Get()->GetNonNativeFileSystemDelegate();
|
| - if (delegate && delegate->IsUnderNonNativeLocalPath(profile, path)) {
|
| - delegate->IsNonNativeLocalPathDirectory(profile, path, callback);
|
| + if (delegate && delegate->IsUnderNonNativeLocalPath(context, path)) {
|
| + delegate->IsNonNativeLocalPathDirectory(context, path, callback);
|
| return;
|
| }
|
| #endif
|
| @@ -61,8 +61,8 @@ void EntryIsDirectory(Profile* profile,
|
|
|
| } // namespace
|
|
|
| -IsDirectoryCollector::IsDirectoryCollector(Profile* profile)
|
| - : profile_(profile), left_(0), weak_ptr_factory_(this) {}
|
| +IsDirectoryCollector::IsDirectoryCollector(content::BrowserContext* context)
|
| + : context_(context), left_(0), weak_ptr_factory_(this) {}
|
|
|
| IsDirectoryCollector::~IsDirectoryCollector() {}
|
|
|
| @@ -86,7 +86,7 @@ void IsDirectoryCollector::CollectForEntriesPaths(
|
| }
|
|
|
| for (size_t i = 0; i < paths.size(); ++i) {
|
| - EntryIsDirectory(profile_, paths[i],
|
| + EntryIsDirectory(context_, paths[i],
|
| base::Bind(&IsDirectoryCollector::OnIsDirectoryCollected,
|
| weak_ptr_factory_.GetWeakPtr(), i));
|
| }
|
|
|