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

Side by Side Diff: base/logging.cc

Issue 1124673004: Chrome OS: Reduce NOTREACHED() overhead for release builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove function name from log for further size gains. Created 5 years, 7 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
« no previous file with comments | « base/logging.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/logging.h" 5 #include "base/logging.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 typedef HANDLE FileHandle; 10 typedef HANDLE FileHandle;
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 #undef write 796 #undef write
797 797
798 #if defined(OS_WIN) 798 #if defined(OS_WIN)
799 std::wstring GetLogFileFullPath() { 799 std::wstring GetLogFileFullPath() {
800 if (log_file_name) 800 if (log_file_name)
801 return *log_file_name; 801 return *log_file_name;
802 return std::wstring(); 802 return std::wstring();
803 } 803 }
804 #endif 804 #endif
805 805
806 void LogErrorNotReached(const char* file, int line) {
807 LogMessage(file, line, LOG_ERROR).stream()
808 << "NOTREACHED() hit.";
809 }
810
806 } // namespace logging 811 } // namespace logging
807 812
808 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 813 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
809 return out << base::WideToUTF8(wstr); 814 return out << base::WideToUTF8(wstr);
810 } 815 }
OLDNEW
« no previous file with comments | « base/logging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698