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 "chrome/browser/ui/webui/options/certificate_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 int* saved_errno, | 275 int* saved_errno, |
276 std::string* data) { | 276 std::string* data) { |
277 bool success = base::ReadFileToString(path, data); | 277 bool success = base::ReadFileToString(path, data); |
278 *saved_errno = success ? 0 : errno; | 278 *saved_errno = success ? 0 : errno; |
279 } | 279 } |
280 | 280 |
281 void FileAccessProvider::DoWrite(const base::FilePath& path, | 281 void FileAccessProvider::DoWrite(const base::FilePath& path, |
282 const std::string& data, | 282 const std::string& data, |
283 int* saved_errno, | 283 int* saved_errno, |
284 int* bytes_written) { | 284 int* bytes_written) { |
285 *bytes_written = file_util::WriteFile(path, data.data(), data.size()); | 285 *bytes_written = base::WriteFile(path, data.data(), data.size()); |
286 *saved_errno = *bytes_written >= 0 ? 0 : errno; | 286 *saved_errno = *bytes_written >= 0 ? 0 : errno; |
287 } | 287 } |
288 | 288 |
289 /////////////////////////////////////////////////////////////////////////////// | 289 /////////////////////////////////////////////////////////////////////////////// |
290 // CertificateManagerHandler | 290 // CertificateManagerHandler |
291 | 291 |
292 CertificateManagerHandler::CertificateManagerHandler() | 292 CertificateManagerHandler::CertificateManagerHandler() |
293 : requested_certificate_manager_model_(false), | 293 : requested_certificate_manager_model_(false), |
294 use_hardware_backed_(false), | 294 use_hardware_backed_(false), |
295 file_access_provider_(new FileAccessProvider()), | 295 file_access_provider_(new FileAccessProvider()), |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 title_value, | 1128 title_value, |
1129 error_value, | 1129 error_value, |
1130 cert_error_list); | 1130 cert_error_list); |
1131 } | 1131 } |
1132 | 1132 |
1133 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1133 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1134 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1134 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
1135 } | 1135 } |
1136 | 1136 |
1137 } // namespace options | 1137 } // namespace options |
OLD | NEW |