| 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/extensions/api/file_system/file_system_api.h" | 5 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // Short circuit the user consent dialog for tests. This is far from a pretty | 433 // Short circuit the user consent dialog for tests. This is far from a pretty |
| 434 // code design. | 434 // code design. |
| 435 if (g_auto_dialog_button_for_test != ui::DIALOG_BUTTON_NONE) { | 435 if (g_auto_dialog_button_for_test != ui::DIALOG_BUTTON_NONE) { |
| 436 base::ThreadTaskRunnerHandle::Get()->PostTask( | 436 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 437 FROM_HERE, | 437 FROM_HERE, |
| 438 base::Bind(callback, g_auto_dialog_button_for_test /* result */)); | 438 base::Bind(callback, g_auto_dialog_button_for_test /* result */)); |
| 439 return; | 439 return; |
| 440 } | 440 } |
| 441 | 441 |
| 442 RequestFileSystemDialogView::ShowDialog(web_contents, extension, volume, | 442 RequestFileSystemDialogView::ShowDialog(web_contents, extension, volume, |
| 443 writable, base::Bind(callback)); | 443 writable, callback); |
| 444 } | 444 } |
| 445 | 445 |
| 446 void ConsentProviderDelegate::ShowNotification( | 446 void ConsentProviderDelegate::ShowNotification( |
| 447 const Extension& extension, | 447 const Extension& extension, |
| 448 const base::WeakPtr<file_manager::Volume>& volume, | 448 const base::WeakPtr<file_manager::Volume>& volume, |
| 449 bool writable) { | 449 bool writable) { |
| 450 RequestFileSystemNotification::ShowAutoGrantedNotification( | 450 RequestFileSystemNotification::ShowAutoGrantedNotification( |
| 451 profile_, extension, volume, writable); | 451 profile_, extension, volume, writable); |
| 452 } | 452 } |
| 453 | 453 |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); | 1436 return RespondNow(Error(kNotSupportedOnNonKioskSessionError)); |
| 1437 std::vector<api::file_system::Volume> result_volume_list; | 1437 std::vector<api::file_system::Volume> result_volume_list; |
| 1438 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); | 1438 FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); |
| 1439 | 1439 |
| 1440 return RespondNow(ArgumentList( | 1440 return RespondNow(ArgumentList( |
| 1441 api::file_system::GetVolumeList::Results::Create(result_volume_list))); | 1441 api::file_system::GetVolumeList::Results::Create(result_volume_list))); |
| 1442 } | 1442 } |
| 1443 #endif | 1443 #endif |
| 1444 | 1444 |
| 1445 } // namespace extensions | 1445 } // namespace extensions |
| OLD | NEW |