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 "webkit/browser/fileapi/quota/open_file_handle.h" | 5 #include "storage/browser/fileapi/quota/open_file_handle.h" |
6 | 6 |
7 #include "webkit/browser/fileapi/quota/open_file_handle_context.h" | 7 #include "storage/browser/fileapi/quota/open_file_handle_context.h" |
8 #include "webkit/browser/fileapi/quota/quota_reservation.h" | 8 #include "storage/browser/fileapi/quota/quota_reservation.h" |
9 | 9 |
10 namespace fileapi { | 10 namespace storage { |
11 | 11 |
12 OpenFileHandle::~OpenFileHandle() { | 12 OpenFileHandle::~OpenFileHandle() { |
13 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); | 13 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); |
14 } | 14 } |
15 | 15 |
16 void OpenFileHandle::UpdateMaxWrittenOffset(int64 offset) { | 16 void OpenFileHandle::UpdateMaxWrittenOffset(int64 offset) { |
17 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); | 17 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); |
18 | 18 |
19 int64 growth = context_->UpdateMaxWrittenOffset(offset); | 19 int64 growth = context_->UpdateMaxWrittenOffset(offset); |
20 if (growth > 0) | 20 if (growth > 0) |
(...skipping 19 matching lines...) Expand all Loading... |
40 return context_->GetMaxWrittenOffset(); | 40 return context_->GetMaxWrittenOffset(); |
41 } | 41 } |
42 | 42 |
43 const base::FilePath& OpenFileHandle::platform_path() const { | 43 const base::FilePath& OpenFileHandle::platform_path() const { |
44 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); | 44 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); |
45 return context_->platform_path(); | 45 return context_->platform_path(); |
46 } | 46 } |
47 | 47 |
48 OpenFileHandle::OpenFileHandle(QuotaReservation* reservation, | 48 OpenFileHandle::OpenFileHandle(QuotaReservation* reservation, |
49 OpenFileHandleContext* context) | 49 OpenFileHandleContext* context) |
50 : reservation_(reservation), | 50 : reservation_(reservation), context_(context) { |
51 context_(context) { | |
52 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); | 51 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); |
53 } | 52 } |
54 | 53 |
55 } // namespace fileapi | 54 } // namespace storage |
OLD | NEW |