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 "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/base/file_path_string_conversions.h" | 15 #include "webkit/common/base/file_path_string_conversions.h" |
16 #include "webkit/glue/webkit_glue.h" | 16 #include "webkit/glue/webkit_glue.h" |
17 | 17 |
18 using WebKit::WebString; | 18 using WebKit::WebString; |
19 | 19 |
20 namespace webkit_glue { | 20 namespace webkit_glue { |
21 | 21 |
22 WebFileUtilitiesImpl::WebFileUtilitiesImpl() | 22 WebFileUtilitiesImpl::WebFileUtilitiesImpl() |
23 : sandbox_enabled_(true) { | 23 : sandbox_enabled_(true) { |
24 } | 24 } |
25 | 25 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 int WebFileUtilitiesImpl::writeToFile(base::PlatformFile handle, | 135 int WebFileUtilitiesImpl::writeToFile(base::PlatformFile handle, |
136 const char* data, | 136 const char* data, |
137 int length) { | 137 int length) { |
138 if (handle == base::kInvalidPlatformFileValue || !data || length <= 0) | 138 if (handle == base::kInvalidPlatformFileValue || !data || length <= 0) |
139 return -1; | 139 return -1; |
140 return base::WritePlatformFileCurPosNoBestEffort(handle, data, length); | 140 return base::WritePlatformFileCurPosNoBestEffort(handle, data, length); |
141 } | 141 } |
142 | 142 |
143 } // namespace webkit_glue | 143 } // namespace webkit_glue |
OLD | NEW |