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 <utility> | 6 #include <utility> |
6 | 7 |
7 #include "base/files/file.h" | 8 #include "base/files/file.h" |
8 #include "base/macros.h" | 9 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/thread_task_runner_handle.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" | 14 #include "chrome/browser/chromeos/file_system_provider/notification_manager_inte
rface.h" |
15 #include "chrome/browser/chromeos/file_system_provider/observer.h" | 15 #include "chrome/browser/chromeos/file_system_provider/observer.h" |
16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 16 #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" | 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
18 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" | 18 #include "chrome/browser/chromeos/file_system_provider/request_manager.h" |
19 #include "chrome/browser/chromeos/file_system_provider/request_value.h" | 19 #include "chrome/browser/chromeos/file_system_provider/request_value.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 base::File::Error error) override { | 90 base::File::Error error) override { |
91 if (error != base::File::FILE_OK) | 91 if (error != base::File::FILE_OK) |
92 return; | 92 return; |
93 | 93 |
94 ProvidedFileSystemInterface* const file_system = | 94 ProvidedFileSystemInterface* const file_system = |
95 service_->GetProvidedFileSystem(file_system_info.extension_id(), | 95 service_->GetProvidedFileSystem(file_system_info.extension_id(), |
96 file_system_info.file_system_id()); | 96 file_system_info.file_system_id()); |
97 DCHECK(file_system); | 97 DCHECK(file_system); |
98 file_system->GetRequestManager()->SetTimeoutForTesting(base::TimeDelta()); | 98 file_system->GetRequestManager()->SetTimeoutForTesting(base::TimeDelta()); |
99 | 99 |
100 scoped_ptr<NotificationButtonClicker> clicker( | 100 std::unique_ptr<NotificationButtonClicker> clicker( |
101 new NotificationButtonClicker(file_system->GetFileSystemInfo())); | 101 new NotificationButtonClicker(file_system->GetFileSystemInfo())); |
102 | 102 |
103 file_system->GetRequestManager()->AddObserver(clicker.get()); | 103 file_system->GetRequestManager()->AddObserver(clicker.get()); |
104 clickers_.push_back(std::move(clicker)); | 104 clickers_.push_back(std::move(clicker)); |
105 } | 105 } |
106 | 106 |
107 void OnProvidedFileSystemUnmount( | 107 void OnProvidedFileSystemUnmount( |
108 const ProvidedFileSystemInfo& file_system_info, | 108 const ProvidedFileSystemInfo& file_system_info, |
109 base::File::Error error) override {} | 109 base::File::Error error) override {} |
110 | 110 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Unresponsive_App) { | 283 IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Unresponsive_App) { |
284 AbortOnUnresponsivePerformer performer(browser()->profile()); | 284 AbortOnUnresponsivePerformer performer(browser()->profile()); |
285 ASSERT_TRUE(RunPlatformAppTestWithFlags( | 285 ASSERT_TRUE(RunPlatformAppTestWithFlags( |
286 "file_system_provider/unresponsive_app", kFlagLoadAsComponent)) | 286 "file_system_provider/unresponsive_app", kFlagLoadAsComponent)) |
287 << message_; | 287 << message_; |
288 } | 288 } |
289 | 289 |
290 } // namespace extensions | 290 } // namespace extensions |
OLD | NEW |