Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / base / mac / mac_logging.cc
blobd58220fe8977a5bd03f5ec451d23affdbe089a1d
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.
5 #include "base/mac/mac_logging.h"
7 #include <iomanip>
9 #if !defined(OS_IOS)
10 #include <CoreServices/CoreServices.h>
11 #endif
13 namespace logging {
15 OSStatusLogMessage::OSStatusLogMessage(const char* file_path,
16 int line,
17 LogSeverity severity,
18 OSStatus status)
19 : LogMessage(file_path, line, severity),
20 status_(status) {
23 OSStatusLogMessage::~OSStatusLogMessage() {
24 #if defined(OS_IOS)
25 // TODO(ios): Consider using NSError with NSOSStatusErrorDomain to try to
26 // get a description of the failure.
27 stream() << ": " << status_;
28 #else
29 stream() << ": "
30 << GetMacOSStatusErrorString(status_)
31 << " ("
32 << status_
33 << ")";
34 #endif
37 } // namespace logging