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

Side by Side Diff: webkit/plugins/npapi/plugin_stream_posix.cc

Issue 18584011: Rename base::Delete to base::DeleteFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « webkit/plugins/npapi/plugin_instance.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/plugins/npapi/plugin_stream.h" 5 #include "webkit/plugins/npapi/plugin_stream.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 20 matching lines...) Expand all
31 return fwrite(buf, sizeof(char), length, temp_file_); 31 return fwrite(buf, sizeof(char), length, temp_file_);
32 } 32 }
33 33
34 bool PluginStream::OpenTempFile() { 34 bool PluginStream::OpenTempFile() {
35 DCHECK_EQ(static_cast<FILE*>(NULL), temp_file_); 35 DCHECK_EQ(static_cast<FILE*>(NULL), temp_file_);
36 36
37 if (file_util::CreateTemporaryFile(&temp_file_path_)) 37 if (file_util::CreateTemporaryFile(&temp_file_path_))
38 temp_file_ = file_util::OpenFile(temp_file_path_, "a"); 38 temp_file_ = file_util::OpenFile(temp_file_path_, "a");
39 39
40 if (!temp_file_) { 40 if (!temp_file_) {
41 base::Delete(temp_file_path_, false); 41 base::DeleteFile(temp_file_path_, false);
42 ResetTempFileName(); 42 ResetTempFileName();
43 return false; 43 return false;
44 } 44 }
45 return true; 45 return true;
46 } 46 }
47 47
48 void PluginStream::CloseTempFile() { 48 void PluginStream::CloseTempFile() {
49 if (!TempFileIsValid()) 49 if (!TempFileIsValid())
50 return; 50 return;
51 51
52 file_util::CloseFile(temp_file_); 52 file_util::CloseFile(temp_file_);
53 ResetTempFileHandle(); 53 ResetTempFileHandle();
54 } 54 }
55 55
56 bool PluginStream::TempFileIsValid() const { 56 bool PluginStream::TempFileIsValid() const {
57 return temp_file_ != NULL; 57 return temp_file_ != NULL;
58 } 58 }
59 59
60 } // namespace npapi 60 } // namespace npapi
61 } // namespace webkit 61 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698