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

Side by Side Diff: base/mac/mac_logging.cc

Issue 1753523002: Use a non-deprecated method to get a string from an OSStatus error . (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/mac/mac_logging.h"
6 #include "build/build_config.h"
7
8 #include <iomanip>
9
10 #if !defined(OS_IOS)
11 #include <CoreServices/CoreServices.h>
12 #endif
13
14 namespace logging {
15
16 OSStatusLogMessage::OSStatusLogMessage(const char* file_path,
17 int line,
18 LogSeverity severity,
19 OSStatus status)
20 : LogMessage(file_path, line, severity),
21 status_(status) {
22 }
23
24 OSStatusLogMessage::~OSStatusLogMessage() {
25 #if defined(OS_IOS)
26 // TODO(ios): Consider using NSError with NSOSStatusErrorDomain to try to
27 // get a description of the failure.
28 stream() << ": " << status_;
29 #else
30 stream() << ": "
31 << GetMacOSStatusErrorString(status_)
32 << " ("
33 << status_
34 << ")";
35 #endif
36 }
37
38 } // namespace logging
OLDNEW
« no previous file with comments | « base/mac/mac_logging.h ('k') | base/mac/mac_logging.mm » ('j') | base/mac/mac_logging.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698