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

Unified Diff: components/nacl/renderer/plugin/temporary_file.cc

Issue 1615523003: PNaCl cleanup: Remove TempFile class and use base::File instead (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix Windows Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/renderer/plugin/temporary_file.cc
diff --git a/components/nacl/renderer/plugin/temporary_file.cc b/components/nacl/renderer/plugin/temporary_file.cc
deleted file mode 100644
index a80e2b58f3454a378649caefc2f2a068158e5a48..0000000000000000000000000000000000000000
--- a/components/nacl/renderer/plugin/temporary_file.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/nacl/renderer/plugin/temporary_file.h"
-
-#include "base/logging.h"
-#include "build/build_config.h"
-#include "components/nacl/renderer/plugin/plugin.h"
-#include "components/nacl/renderer/plugin/utility.h"
-#include "ppapi/c/private/pp_file_handle.h"
-#include "ppapi/cpp/core.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-
-namespace plugin {
-
-TempFile::TempFile(Plugin* plugin, PP_FileHandle handle)
- : plugin_(plugin),
- file_handle_(handle) { }
-
-TempFile::~TempFile() { }
-
-bool TempFile::Reset() {
- // file_handle_, read_wrapper_ and write_wrapper_ are all backed by the
- // same file handle/descriptor, so resetting the seek position of one
- // will reset them all.
- int64_t newpos = file_handle_.Seek(base::File::FROM_BEGIN, 0);
- return newpos == 0;
-}
-
-int64_t TempFile::GetLength() {
- return file_handle_.GetLength();
-}
-
-PP_FileHandle TempFile::TakeFileHandle() {
- DCHECK(file_handle_.IsValid());
- return file_handle_.TakePlatformFile();
-}
-
-PP_FileHandle TempFile::GetFileHandle() {
- DCHECK(file_handle_.IsValid());
- return file_handle_.GetPlatformFile();
-}
-
-} // namespace plugin

Powered by Google App Engine
This is Rietveld 408576698