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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc

Issue 23581006: Reland 220012: Move the functions of filebrowserPrivateApi from the file_manager namespace to the e… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
index abfc7a739bebf3a483c911ae218b4e66b73226df..7901b6448f0c885e93e15c570ef6236a8b795873 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc
@@ -44,7 +44,7 @@ using content::ChildProcessSecurityPolicy;
using content::WebContents;
using fileapi::FileSystemURL;
-namespace file_manager {
+namespace extensions {
namespace {
// Error messages.
@@ -73,7 +73,7 @@ base::DictionaryValue* CreateValueFromDisk(
std::string mount_path;
if (!volume->mount_path().empty()) {
base::FilePath relative_mount_path;
- util::ConvertAbsoluteFilePathToRelativeFileSystemPath(
+ file_manager::util::ConvertAbsoluteFilePathToRelativeFileSystemPath(
profile, extension_id, base::FilePath(volume->mount_path()),
&relative_mount_path);
mount_path = relative_mount_path.value();
@@ -118,7 +118,7 @@ void SetDriveMountPointPermissions(
}
fileapi::ExternalFileSystemBackend* backend =
- util::GetFileSystemContextForRenderViewHost(
+ file_manager::util::GetFileSystemContextForRenderViewHost(
profile, render_view_host)->external_backend();
if (!backend)
return;
@@ -280,7 +280,7 @@ bool RequestFileSystemFunction::RunImpl() {
set_log_on_completion(true);
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- util::GetFileSystemContextForRenderViewHost(
+ file_manager::util::GetFileSystemContextForRenderViewHost(
profile(), render_view_host());
const GURL origin_url = source_url_.GetOrigin();
@@ -319,7 +319,7 @@ bool FileWatchFunctionBase::RunImpl() {
return false;
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- util::GetFileSystemContextForRenderViewHost(
+ file_manager::util::GetFileSystemContextForRenderViewHost(
profile(), render_view_host());
FileSystemURL file_watch_url = file_system_context->CrackURL(GURL(url));
@@ -346,8 +346,8 @@ void AddFileWatchFunction::PerformFileWatchOperation(
const std::string& extension_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- EventRouter* event_router =
- FileBrowserPrivateAPI::Get(profile_)->event_router();
+ file_manager::EventRouter* event_router =
+ file_manager::FileBrowserPrivateAPI::Get(profile_)->event_router();
event_router->AddFileWatch(
local_path,
virtual_path,
@@ -367,8 +367,8 @@ void RemoveFileWatchFunction::PerformFileWatchOperation(
const std::string& extension_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- EventRouter* event_router =
- FileBrowserPrivateAPI::Get(profile_)->event_router();
+ file_manager::EventRouter* event_router =
+ file_manager::FileBrowserPrivateAPI::Get(profile_)->event_router();
event_router->RemoveFileWatch(local_path, extension_id);
Respond(true);
}
@@ -394,7 +394,7 @@ bool SetLastModifiedFunction::RunImpl() {
if (!args_->GetString(1, &timestamp))
return false;
- base::FilePath local_path = util::GetLocalPathFromURL(
+ base::FilePath local_path = file_manager::util::GetLocalPathFromURL(
render_view_host(), profile(), GURL(file_url));
base::PostTaskAndReplyWithResult(
@@ -423,7 +423,7 @@ bool GetSizeStatsFunction::RunImpl() {
if (!args_->GetString(0, &mount_url))
return false;
- base::FilePath file_path = util::GetLocalPathFromURL(
+ base::FilePath file_path = file_manager::util::GetLocalPathFromURL(
render_view_host(), profile(), GURL(mount_url));
if (file_path.empty())
return false;
@@ -508,7 +508,7 @@ bool GetVolumeMetadataFunction::RunImpl() {
return false;
}
- base::FilePath file_path = util::GetLocalPathFromURL(
+ base::FilePath file_path = file_manager::util::GetLocalPathFromURL(
render_view_host(), profile(), GURL(volume_mount_url));
if (file_path.empty()) {
error_ = "Invalid mount path.";
@@ -549,7 +549,7 @@ bool ValidatePathNameLengthFunction::RunImpl() {
return false;
scoped_refptr<fileapi::FileSystemContext> file_system_context =
- util::GetFileSystemContextForRenderViewHost(
+ file_manager::util::GetFileSystemContextForRenderViewHost(
profile(), render_view_host());
fileapi::FileSystemURL filesystem_url(
@@ -598,7 +598,7 @@ bool FormatDeviceFunction::RunImpl() {
return false;
}
- base::FilePath file_path = util::GetLocalPathFromURL(
+ base::FilePath file_path = file_manager::util::GetLocalPathFromURL(
render_view_host(), profile(), GURL(volume_file_url));
if (file_path.empty())
return false;
@@ -608,4 +608,4 @@ bool FormatDeviceFunction::RunImpl() {
return true;
}
-} // namespace file_manager
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698