Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
Shuhei Takahashi | 975f86a4 | 2017-08-04 08:54:58 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Yeunjoo Choi | ef8a4a4 | 2022-11-08 04:21:05 | [diff] [blame] | 5 | #include "chrome/browser/ash/fileapi/recent_source.h" |
Shuhei Takahashi | 975f86a4 | 2017-08-04 08:54:58 | [diff] [blame] | 6 | |
Yeunjoo Choi | 3d9ed38a | 2022-11-10 02:51:24 | [diff] [blame] | 7 | namespace ash { |
Shuhei Takahashi | 975f86a4 | 2017-08-04 08:54:58 | [diff] [blame] | 8 | |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 9 | RecentSource::Params::Params(storage::FileSystemContext* file_system_context, |
Bo Majewski | 65e32846 | 2024-02-12 06:15:04 | [diff] [blame] | 10 | const int32_t call_id, |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 11 | const GURL& origin, |
Bo Majewski | d5190897 | 2023-10-30 04:40:01 | [diff] [blame] | 12 | const std::string& query, |
Bo Majewski | 3fbd2440 | 2024-05-16 01:06:14 | [diff] [blame] | 13 | size_t max_files, |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 14 | const base::Time& cutoff_time, |
Bo Majewski | 27fde47 | 2023-09-06 05:16:55 | [diff] [blame] | 15 | const base::TimeTicks& end_time, |
Bo Majewski | b5b1880 | 2023-11-22 06:04:53 | [diff] [blame] | 16 | FileType file_type) |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 17 | : file_system_context_(file_system_context), |
Bo Majewski | 65e32846 | 2024-02-12 06:15:04 | [diff] [blame] | 18 | call_id_(call_id), |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 19 | origin_(origin), |
Bo Majewski | d5190897 | 2023-10-30 04:40:01 | [diff] [blame] | 20 | query_(query), |
Bo Majewski | 3fbd2440 | 2024-05-16 01:06:14 | [diff] [blame] | 21 | max_files_(max_files), |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 22 | cutoff_time_(cutoff_time), |
Naoki Fukino | de99484 | 2020-01-09 04:01:41 | [diff] [blame] | 23 | file_type_(file_type), |
Bo Majewski | b5b1880 | 2023-11-22 06:04:53 | [diff] [blame] | 24 | end_time_(end_time) {} |
| 25 | |
Munira Tursunova | b67fa75 | 2024-11-01 08:49:58 | [diff] [blame] | 26 | RecentSource::Params::Params(const Params& params) |
| 27 | : file_system_context_(params.file_system_context_), |
| 28 | call_id_(params.call_id_), |
| 29 | origin_(params.origin_), |
| 30 | query_(params.query_), |
| 31 | max_files_(params.max_files_), |
| 32 | cutoff_time_(params.cutoff_time_), |
| 33 | file_type_(params.file_type_), |
| 34 | end_time_(params.end_time_) {} |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 35 | |
Bo Majewski | 27fde47 | 2023-09-06 05:16:55 | [diff] [blame] | 36 | bool RecentSource::Params::IsLate() const { |
| 37 | return base::TimeTicks::Now() > end_time_; |
| 38 | } |
| 39 | |
Shuhei Takahashi | f6d8747 | 2017-08-22 07:07:04 | [diff] [blame] | 40 | RecentSource::Params::~Params() = default; |
| 41 | |
Bo Majewski | 6f33bc8 | 2024-05-28 02:24:00 | [diff] [blame] | 42 | RecentSource::RecentSource( |
| 43 | extensions::api::file_manager_private::VolumeType volume_type) |
| 44 | : volume_type_(volume_type) {} |
Shuhei Takahashi | 975f86a4 | 2017-08-04 08:54:58 | [diff] [blame] | 45 | |
| 46 | RecentSource::~RecentSource() = default; |
| 47 | |
Yeunjoo Choi | 3d9ed38a | 2022-11-10 02:51:24 | [diff] [blame] | 48 | } // namespace ash |