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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 "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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/web_applications/web_app_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698