| 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/chromeos/extensions/file_manager/private_api_drive.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_drive.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 8 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
| 9 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" | 9 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
| 10 #include "chrome/browser/chromeos/file_manager/file_tasks.h" | 10 #include "chrome/browser/chromeos/file_manager/file_tasks.h" |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 result_dict->SetString( | 725 result_dict->SetString( |
| 726 "highlightedBaseName", | 726 "highlightedBaseName", |
| 727 search_result_info_list->at(i).highlighted_base_name); | 727 search_result_info_list->at(i).highlighted_base_name); |
| 728 results_list->Append(result_dict); | 728 results_list->Append(result_dict); |
| 729 } | 729 } |
| 730 | 730 |
| 731 SetResult(results_list); | 731 SetResult(results_list); |
| 732 SendResponse(true); | 732 SendResponse(true); |
| 733 } | 733 } |
| 734 | 734 |
| 735 bool FileBrowserPrivateGetDriveConnectionStateFunction::RunImpl() { | 735 bool FileBrowserPrivateGetDriveConnectionStateFunction::RunSync() { |
| 736 api::file_browser_private::DriveConnectionState result; | 736 api::file_browser_private::DriveConnectionState result; |
| 737 | 737 |
| 738 switch (drive::util::GetDriveConnectionStatus(GetProfile())) { | 738 switch (drive::util::GetDriveConnectionStatus(GetProfile())) { |
| 739 case drive::util::DRIVE_DISCONNECTED_NOSERVICE: | 739 case drive::util::DRIVE_DISCONNECTED_NOSERVICE: |
| 740 result.type = kDriveConnectionTypeOffline; | 740 result.type = kDriveConnectionTypeOffline; |
| 741 result.reason.reset(new std::string(kDriveConnectionReasonNoService)); | 741 result.reason.reset(new std::string(kDriveConnectionReasonNoService)); |
| 742 break; | 742 break; |
| 743 case drive::util::DRIVE_DISCONNECTED_NONETWORK: | 743 case drive::util::DRIVE_DISCONNECTED_NONETWORK: |
| 744 result.type = kDriveConnectionTypeOffline; | 744 result.type = kDriveConnectionTypeOffline; |
| 745 result.reason.reset(new std::string(kDriveConnectionReasonNoNetwork)); | 745 result.reason.reset(new std::string(kDriveConnectionReasonNoNetwork)); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 this)); | 886 this)); |
| 887 return true; | 887 return true; |
| 888 } | 888 } |
| 889 | 889 |
| 890 void FileBrowserPrivateRequestDriveShareFunction::OnAddPermission( | 890 void FileBrowserPrivateRequestDriveShareFunction::OnAddPermission( |
| 891 drive::FileError error) { | 891 drive::FileError error) { |
| 892 SendResponse(error == drive::FILE_ERROR_OK); | 892 SendResponse(error == drive::FILE_ERROR_OK); |
| 893 } | 893 } |
| 894 | 894 |
| 895 } // namespace extensions | 895 } // namespace extensions |
| OLD | NEW |