| 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_vector.h" | |
| 11 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 13 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" | 13 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" |
| 15 #include "chrome/browser/chromeos/file_system_provider/observer.h" | 14 #include "chrome/browser/chromeos/file_system_provider/observer.h" |
| 16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 15 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
| 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" | 16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
| 18 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" | 17 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" |
| 19 #include "chrome/browser/chromeos/file_system_provider/request_value.h" | 18 #include "chrome/browser/chromeos/file_system_provider/request_value.h" |
| 20 #include "chrome/browser/chromeos/file_system_provider/service.h" | 19 #include "chrome/browser/chromeos/file_system_provider/service.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 file_system->GetRequestManager()->AddObserver(clicker.get()); | 102 file_system->GetRequestManager()->AddObserver(clicker.get()); |
| 104 clickers_.push_back(std::move(clicker)); | 103 clickers_.push_back(std::move(clicker)); |
| 105 } | 104 } |
| 106 | 105 |
| 107 void OnProvidedFileSystemUnmount( | 106 void OnProvidedFileSystemUnmount( |
| 108 const ProvidedFileSystemInfo& file_system_info, | 107 const ProvidedFileSystemInfo& file_system_info, |
| 109 base::File::Error error) override {} | 108 base::File::Error error) override {} |
| 110 | 109 |
| 111 private: | 110 private: |
| 112 Service* service_; // Not owned. | 111 Service* service_; // Not owned. |
| 113 ScopedVector<NotificationButtonClicker> clickers_; | 112 std::vector<std::unique_ptr<NotificationButtonClicker>> clickers_; |
| 114 DISALLOW_COPY_AND_ASSIGN(AbortOnUnresponsivePerformer); | 113 DISALLOW_COPY_AND_ASSIGN(AbortOnUnresponsivePerformer); |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } // namespace | 116 } // namespace |
| 118 | 117 |
| 119 class FileSystemProviderApiTest : public ExtensionApiTest { | 118 class FileSystemProviderApiTest : public ExtensionApiTest { |
| 120 public: | 119 public: |
| 121 FileSystemProviderApiTest() {} | 120 FileSystemProviderApiTest() {} |
| 122 | 121 |
| 123 // Loads a helper testing extension. | 122 // Loads a helper testing extension. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 280 } |
| 282 | 281 |
| 283 IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Unresponsive_App) { | 282 IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Unresponsive_App) { |
| 284 AbortOnUnresponsivePerformer performer(browser()->profile()); | 283 AbortOnUnresponsivePerformer performer(browser()->profile()); |
| 285 ASSERT_TRUE(RunPlatformAppTestWithFlags( | 284 ASSERT_TRUE(RunPlatformAppTestWithFlags( |
| 286 "file_system_provider/unresponsive_app", kFlagLoadAsComponent)) | 285 "file_system_provider/unresponsive_app", kFlagLoadAsComponent)) |
| 287 << message_; | 286 << message_; |
| 288 } | 287 } |
| 289 | 288 |
| 290 } // namespace extensions | 289 } // namespace extensions |
| OLD | NEW |