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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 result_dict->SetString( | 730 result_dict->SetString( |
731 "highlightedBaseName", | 731 "highlightedBaseName", |
732 search_result_info_list->at(i).highlighted_base_name); | 732 search_result_info_list->at(i).highlighted_base_name); |
733 results_list->Append(result_dict); | 733 results_list->Append(result_dict); |
734 } | 734 } |
735 | 735 |
736 SetResult(results_list); | 736 SetResult(results_list); |
737 SendResponse(true); | 737 SendResponse(true); |
738 } | 738 } |
739 | 739 |
740 bool FileBrowserPrivateGetDriveConnectionStateFunction::RunImpl() { | 740 bool FileBrowserPrivateGetDriveConnectionStateFunction::RunSync() { |
741 api::file_browser_private::DriveConnectionState result; | 741 api::file_browser_private::DriveConnectionState result; |
742 | 742 |
743 switch (drive::util::GetDriveConnectionStatus(GetProfile())) { | 743 switch (drive::util::GetDriveConnectionStatus(GetProfile())) { |
744 case drive::util::DRIVE_DISCONNECTED_NOSERVICE: | 744 case drive::util::DRIVE_DISCONNECTED_NOSERVICE: |
745 result.type = kDriveConnectionTypeOffline; | 745 result.type = kDriveConnectionTypeOffline; |
746 result.reason.reset(new std::string(kDriveConnectionReasonNoService)); | 746 result.reason.reset(new std::string(kDriveConnectionReasonNoService)); |
747 break; | 747 break; |
748 case drive::util::DRIVE_DISCONNECTED_NONETWORK: | 748 case drive::util::DRIVE_DISCONNECTED_NONETWORK: |
749 result.type = kDriveConnectionTypeOffline; | 749 result.type = kDriveConnectionTypeOffline; |
750 result.reason.reset(new std::string(kDriveConnectionReasonNoNetwork)); | 750 result.reason.reset(new std::string(kDriveConnectionReasonNoNetwork)); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 this)); | 891 this)); |
892 return true; | 892 return true; |
893 } | 893 } |
894 | 894 |
895 void FileBrowserPrivateRequestDriveShareFunction::OnAddPermission( | 895 void FileBrowserPrivateRequestDriveShareFunction::OnAddPermission( |
896 drive::FileError error) { | 896 drive::FileError error) { |
897 SendResponse(error == drive::FILE_ERROR_OK); | 897 SendResponse(error == drive::FILE_ERROR_OK); |
898 } | 898 } |
899 | 899 |
900 } // namespace extensions | 900 } // namespace extensions |
OLD | NEW |