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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc

Issue 23477070: Move OnFileSystemMounted/BeingUnmounted to VolumeManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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/chromeos/extensions/file_manager/private_api_mount.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_mount.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/drive/file_system_interface.h" 9 #include "chrome/browser/chromeos/drive/file_system_interface.h"
10 #include "chrome/browser/chromeos/drive/file_system_util.h" 10 #include "chrome/browser/chromeos/drive/file_system_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 "%s[%d] called. (source: '%s', type:'%s')", 79 "%s[%d] called. (source: '%s', type:'%s')",
80 name().c_str(), 80 name().c_str(),
81 request_id(), 81 request_id(),
82 file_url.empty() ? "(none)" : file_url.c_str(), 82 file_url.empty() ? "(none)" : file_url.c_str(),
83 mount_type.c_str()); 83 mount_type.c_str());
84 set_log_on_completion(true); 84 set_log_on_completion(true);
85 85
86 if (mount_type == "drive") { 86 if (mount_type == "drive") {
87 // Dispatch fake 'mounted' event because JS code depends on it. 87 // Dispatch fake 'mounted' event because JS code depends on it.
88 // TODO(hashimoto): Remove this redanduncy. 88 // TODO(hashimoto): Remove this redanduncy.
89 file_manager::FileBrowserPrivateAPI::Get(profile_)->event_router()-> 89 file_manager::VolumeManager::Get(profile_)->OnFileSystemMounted();
90 OnFileSystemMounted();
91 90
92 // Pass back the drive mount point path as source path. 91 // Pass back the drive mount point path as source path.
93 const std::string& drive_path = 92 const std::string& drive_path =
94 drive::util::GetDriveMountPointPathAsString(); 93 drive::util::GetDriveMountPointPathAsString();
95 SetResult(new base::StringValue(drive_path)); 94 SetResult(new base::StringValue(drive_path));
96 SendResponse(true); 95 SendResponse(true);
97 } else if (mount_type == "archive") { 96 } else if (mount_type == "archive") {
98 const base::FilePath path = file_manager::util::GetLocalPathFromURL( 97 const base::FilePath path = file_manager::util::GetLocalPathFromURL(
99 render_view_host(), profile(), GURL(file_url)); 98 render_view_host(), profile(), GURL(file_url));
100 99
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 logging::LOG_INFO, 229 logging::LOG_INFO,
231 "%s[%d] succeeded. (results: '[%s]', %" PRIuS " mount points)", 230 "%s[%d] succeeded. (results: '[%s]', %" PRIuS " mount points)",
232 name().c_str(), request_id(), log_string.c_str(), result->GetSize()); 231 name().c_str(), request_id(), log_string.c_str(), result->GetSize());
233 232
234 SetResult(result); 233 SetResult(result);
235 SendResponse(true); 234 SendResponse(true);
236 return true; 235 return true;
237 } 236 }
238 237
239 } // namespace extensions 238 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/event_router.cc ('k') | chrome/browser/chromeos/file_manager/volume_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698