OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/nacl/renderer/plugin/temporary_file.h" | 5 #include "components/nacl/renderer/plugin/temporary_file.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/nacl/renderer/plugin/plugin.h" | 8 #include "components/nacl/renderer/plugin/plugin.h" |
9 #include "components/nacl/renderer/plugin/utility.h" | 9 #include "components/nacl/renderer/plugin/utility.h" |
10 #include "native_client/src/include/portability_io.h" | 10 #include "native_client/src/include/portability_io.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // backed by the same file, so it should also reset. | 57 // backed by the same file, so it should also reset. |
58 CHECK(read_wrapper_); | 58 CHECK(read_wrapper_); |
59 nacl_off64_t newpos = read_wrapper_->Seek(0, SEEK_SET); | 59 nacl_off64_t newpos = read_wrapper_->Seek(0, SEEK_SET); |
60 return newpos == 0; | 60 return newpos == 0; |
61 } | 61 } |
62 | 62 |
63 PP_FileHandle TempFile::TakeFileHandle() { | 63 PP_FileHandle TempFile::TakeFileHandle() { |
64 return file_handle_.TakePlatformFile(); | 64 return file_handle_.TakePlatformFile(); |
65 } | 65 } |
66 | 66 |
67 PP_FileHandle TempFile::GetFileHandle() { | |
bbudge
2015/12/16 20:30:06
DCHECK(file_handle_.IsValid()); ?
Mark Seaborn
2015/12/17 06:09:56
OK. How about I put the same into TakeFileHandle(
bbudge
2015/12/17 19:10:21
sgtm
| |
68 return file_handle_.GetPlatformFile(); | |
69 } | |
70 | |
67 } // namespace plugin | 71 } // namespace plugin |
OLD | NEW |