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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 data, | 265 data, |
266 saved_errno, | 266 saved_errno, |
267 bytes_written), | 267 bytes_written), |
268 base::Bind( | 268 base::Bind( |
269 callback, base::Owned(saved_errno), base::Owned(bytes_written))); | 269 callback, base::Owned(saved_errno), base::Owned(bytes_written))); |
270 } | 270 } |
271 | 271 |
272 void FileAccessProvider::DoRead(const base::FilePath& path, | 272 void FileAccessProvider::DoRead(const base::FilePath& path, |
273 int* saved_errno, | 273 int* saved_errno, |
274 std::string* data) { | 274 std::string* data) { |
275 bool success = file_util::ReadFileToString(path, data); | 275 bool success = base::ReadFileToString(path, data); |
276 *saved_errno = success ? 0 : errno; | 276 *saved_errno = success ? 0 : errno; |
277 } | 277 } |
278 | 278 |
279 void FileAccessProvider::DoWrite(const base::FilePath& path, | 279 void FileAccessProvider::DoWrite(const base::FilePath& path, |
280 const std::string& data, | 280 const std::string& data, |
281 int* saved_errno, | 281 int* saved_errno, |
282 int* bytes_written) { | 282 int* bytes_written) { |
283 *bytes_written = file_util::WriteFile(path, data.data(), data.size()); | 283 *bytes_written = file_util::WriteFile(path, data.data(), data.size()); |
284 *saved_errno = *bytes_written >= 0 ? 0 : errno; | 284 *saved_errno = *bytes_written >= 0 ? 0 : errno; |
285 } | 285 } |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", | 1118 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", |
1119 ready); | 1119 ready); |
1120 } | 1120 } |
1121 #endif | 1121 #endif |
1122 | 1122 |
1123 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1123 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1124 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); | 1124 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); |
1125 } | 1125 } |
1126 | 1126 |
1127 } // namespace options | 1127 } // namespace options |
OLD | NEW |