OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_browser_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" |
6 | 6 |
7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
8 #include <sys/statvfs.h> | 8 #include <sys/statvfs.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <utime.h> | 10 #include <utime.h> |
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1419 SetResult(new base::StringValue("")); | 1419 SetResult(new base::StringValue("")); |
1420 | 1420 |
1421 chromeos::MountType mount_type = | 1421 chromeos::MountType mount_type = |
1422 DiskMountManager::MountTypeFromString(mount_type_str); | 1422 DiskMountManager::MountTypeFromString(mount_type_str); |
1423 switch (mount_type) { | 1423 switch (mount_type) { |
1424 case chromeos::MOUNT_TYPE_INVALID: { | 1424 case chromeos::MOUNT_TYPE_INVALID: { |
1425 error_ = "Invalid mount type"; | 1425 error_ = "Invalid mount type"; |
1426 SendResponse(false); | 1426 SendResponse(false); |
1427 break; | 1427 break; |
1428 } | 1428 } |
1429 case chromeos::MOUNT_TYPE_GDATA: { | 1429 case chromeos::MOUNT_TYPE_GOOGLE_DRIVE: { |
1430 const bool success = true; | 1430 const bool success = true; |
1431 // Pass back the drive mount point path as source path. | 1431 // Pass back the drive mount point path as source path. |
1432 const std::string& drive_path = | 1432 const std::string& drive_path = |
1433 drive::util::GetDriveMountPointPathAsString(); | 1433 drive::util::GetDriveMountPointPathAsString(); |
1434 SetResult(new base::StringValue(drive_path)); | 1434 SetResult(new base::StringValue(drive_path)); |
1435 FileBrowserEventRouterFactory::GetForProfile(profile_)-> | 1435 FileBrowserEventRouterFactory::GetForProfile(profile_)-> |
1436 MountDrive(base::Bind(&AddMountFunction::SendResponse, | 1436 MountDrive(base::Bind(&AddMountFunction::SendResponse, |
1437 this, | 1437 this, |
1438 success)); | 1438 success)); |
1439 break; | 1439 break; |
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3063 | 3063 |
3064 // Keep the refcount until the zipping is complete on utility process. | 3064 // Keep the refcount until the zipping is complete on utility process. |
3065 AddRef(); | 3065 AddRef(); |
3066 } | 3066 } |
3067 | 3067 |
3068 void ZipSelectionFunction::OnZipDone(bool success) { | 3068 void ZipSelectionFunction::OnZipDone(bool success) { |
3069 SetResult(new base::FundamentalValue(success)); | 3069 SetResult(new base::FundamentalValue(success)); |
3070 SendResponse(true); | 3070 SendResponse(true); |
3071 Release(); | 3071 Release(); |
3072 } | 3072 } |
OLD | NEW |