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

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

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/media_galleries/win/snapshot_file_details.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/win/snapshot_file_details.h" 5 #include "chrome/browser/media_galleries/win/snapshot_file_details.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 10
11 using fileapi::MTPDeviceAsyncDelegate;
12
13 /////////////////////////////////////////////////////////////////////////////// 11 ///////////////////////////////////////////////////////////////////////////////
14 // SnapshotRequestInfo // 12 // SnapshotRequestInfo //
15 /////////////////////////////////////////////////////////////////////////////// 13 ///////////////////////////////////////////////////////////////////////////////
16 14
17 SnapshotRequestInfo::SnapshotRequestInfo( 15 SnapshotRequestInfo::SnapshotRequestInfo(
18 const base::FilePath& device_file_path, 16 const base::FilePath& device_file_path,
19 const base::FilePath& snapshot_file_path, 17 const base::FilePath& snapshot_file_path,
20 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback& 18 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback&
21 success_callback, 19 success_callback,
22 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback) 20 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if ((bytes_written == 0) || 62 if ((bytes_written == 0) ||
65 (bytes_written_ > kuint64max - bytes_written) || 63 (bytes_written_ > kuint64max - bytes_written) ||
66 (bytes_written_ + bytes_written > file_info_.size)) 64 (bytes_written_ + bytes_written > file_info_.size))
67 return false; 65 return false;
68 66
69 bytes_written_ += bytes_written; 67 bytes_written_ += bytes_written;
70 return true; 68 return true;
71 } 69 }
72 70
73 } // namespace chrome 71 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/win/snapshot_file_details.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698