Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: chrome/browser/media_galleries/chromeos/snapshot_file_details.cc

Issue 2358493002: Remove MTP support on Linux. (Closed)
Patch Set: move files Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/media_galleries/linux/snapshot_file_details.h" 5 #include "chrome/browser/media_galleries/chromeos/snapshot_file_details.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 10
11 //////////////////////////////////////////////////////////////////////////////// 11 ////////////////////////////////////////////////////////////////////////////////
12 // SnapshotRequestInfo // 12 // SnapshotRequestInfo //
13 //////////////////////////////////////////////////////////////////////////////// 13 ////////////////////////////////////////////////////////////////////////////////
14 14
15 SnapshotRequestInfo::SnapshotRequestInfo( 15 SnapshotRequestInfo::SnapshotRequestInfo(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return !error_occurred_ && (bytes_written_ == file_info_.size); 63 return !error_occurred_ && (bytes_written_ == file_info_.size);
64 } 64 }
65 65
66 uint32_t SnapshotFileDetails::BytesToRead() const { 66 uint32_t SnapshotFileDetails::BytesToRead() const {
67 // Read data in 1MB chunks. 67 // Read data in 1MB chunks.
68 static const uint32_t kReadChunkSize = 1024 * 1024; 68 static const uint32_t kReadChunkSize = 1024 * 1024;
69 return std::min( 69 return std::min(
70 kReadChunkSize, 70 kReadChunkSize,
71 base::checked_cast<uint32_t>(file_info_.size) - bytes_written_); 71 base::checked_cast<uint32_t>(file_info_.size) - bytes_written_);
72 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698