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

Side by Side Diff: webkit/glue/webfileutilities_impl.cc

Issue 18286004: Move PathExists to base namespace. (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
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/glue/webfileutilities_impl.h" 5 #include "webkit/glue/webfileutilities_impl.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
11 #include "net/base/net_util.h" 11 #include "net/base/net_util.h"
12 #include "third_party/WebKit/public/platform/WebFileInfo.h" 12 #include "third_party/WebKit/public/platform/WebFileInfo.h"
13 #include "third_party/WebKit/public/platform/WebString.h" 13 #include "third_party/WebKit/public/platform/WebString.h"
14 #include "third_party/WebKit/public/platform/WebURL.h" 14 #include "third_party/WebKit/public/platform/WebURL.h"
15 #include "webkit/glue/webkit_glue.h" 15 #include "webkit/glue/webkit_glue.h"
16 16
17 using WebKit::WebString; 17 using WebKit::WebString;
18 18
19 namespace webkit_glue { 19 namespace webkit_glue {
20 20
21 WebFileUtilitiesImpl::WebFileUtilitiesImpl() 21 WebFileUtilitiesImpl::WebFileUtilitiesImpl()
22 : sandbox_enabled_(true) { 22 : sandbox_enabled_(true) {
23 } 23 }
24 24
25 WebFileUtilitiesImpl::~WebFileUtilitiesImpl() { 25 WebFileUtilitiesImpl::~WebFileUtilitiesImpl() {
26 } 26 }
27 27
28 bool WebFileUtilitiesImpl::fileExists(const WebString& path) { 28 bool WebFileUtilitiesImpl::fileExists(const WebString& path) {
29 return file_util::PathExists(base::FilePath::FromUTF16Unsafe(path)); 29 return base::PathExists(base::FilePath::FromUTF16Unsafe(path));
30 } 30 }
31 31
32 bool WebFileUtilitiesImpl::deleteFile(const WebString& path) { 32 bool WebFileUtilitiesImpl::deleteFile(const WebString& path) {
33 NOTREACHED(); 33 NOTREACHED();
34 return false; 34 return false;
35 } 35 }
36 36
37 bool WebFileUtilitiesImpl::deleteEmptyDirectory(const WebString& path) { 37 bool WebFileUtilitiesImpl::deleteEmptyDirectory(const WebString& path) {
38 NOTREACHED(); 38 NOTREACHED();
39 return false; 39 return false;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 int WebFileUtilitiesImpl::writeToFile(base::PlatformFile handle, 130 int WebFileUtilitiesImpl::writeToFile(base::PlatformFile handle,
131 const char* data, 131 const char* data,
132 int length) { 132 int length) {
133 if (handle == base::kInvalidPlatformFileValue || !data || length <= 0) 133 if (handle == base::kInvalidPlatformFileValue || !data || length <= 0)
134 return -1; 134 return -1;
135 return base::WritePlatformFileCurPosNoBestEffort(handle, data, length); 135 return base::WritePlatformFileCurPosNoBestEffort(handle, data, length);
136 } 136 }
137 137
138 } // namespace webkit_glue 138 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/common/blob/shareable_file_reference_unittest.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698