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

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

Issue 23727009: Cleanup: Remove chrome namespace for storage monitor and media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 7 years, 3 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 | Annotate | Revision Log
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 {
10
11 /////////////////////////////////////////////////////////////////////////////// 9 ///////////////////////////////////////////////////////////////////////////////
12 // SnapshotRequestInfo // 10 // SnapshotRequestInfo //
13 /////////////////////////////////////////////////////////////////////////////// 11 ///////////////////////////////////////////////////////////////////////////////
14 12
15 SnapshotRequestInfo::SnapshotRequestInfo( 13 SnapshotRequestInfo::SnapshotRequestInfo(
16 const base::FilePath& device_file_path, 14 const base::FilePath& device_file_path,
17 const base::FilePath& snapshot_file_path, 15 const base::FilePath& snapshot_file_path,
18 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback& 16 const MTPDeviceAsyncDelegate::CreateSnapshotFileSuccessCallback&
19 success_callback, 17 success_callback,
20 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback) 18 const MTPDeviceAsyncDelegate::ErrorCallback& error_callback)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 58
61 bool SnapshotFileDetails::AddBytesWritten(DWORD bytes_written) { 59 bool SnapshotFileDetails::AddBytesWritten(DWORD bytes_written) {
62 if ((bytes_written == 0) || 60 if ((bytes_written == 0) ||
63 (bytes_written_ > kuint64max - bytes_written) || 61 (bytes_written_ > kuint64max - bytes_written) ||
64 (bytes_written_ + bytes_written > file_info_.size)) 62 (bytes_written_ + bytes_written > file_info_.size))
65 return false; 63 return false;
66 64
67 bytes_written_ += bytes_written; 65 bytes_written_ += bytes_written;
68 return true; 66 return true;
69 } 67 }
70
71 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698