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

Side by Side Diff: base/logging.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } 680 }
681 if (log_tickcount) 681 if (log_tickcount)
682 stream_ << TickCount() << ':'; 682 stream_ << TickCount() << ':';
683 if (severity_ >= 0) 683 if (severity_ >= 0)
684 stream_ << log_severity_name(severity_); 684 stream_ << log_severity_name(severity_);
685 else 685 else
686 stream_ << "VERBOSE" << -severity_; 686 stream_ << "VERBOSE" << -severity_;
687 687
688 stream_ << ":" << filename << "(" << line << ")] "; 688 stream_ << ":" << filename << "(" << line << ")] ";
689 689
690 message_start_ = stream_.tellp(); 690 message_start_ = stream_.str().length();
691 } 691 }
692 692
693 #if defined(OS_WIN) 693 #if defined(OS_WIN)
694 // This has already been defined in the header, but defining it again as DWORD 694 // This has already been defined in the header, but defining it again as DWORD
695 // ensures that the type used in the header is equivalent to DWORD. If not, 695 // ensures that the type used in the header is equivalent to DWORD. If not,
696 // the redefinition is a compile error. 696 // the redefinition is a compile error.
697 typedef DWORD SystemErrorCode; 697 typedef DWORD SystemErrorCode;
698 #endif 698 #endif
699 699
700 SystemErrorCode GetLastSystemErrorCode() { 700 SystemErrorCode GetLastSystemErrorCode() {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 return *log_file_name; 806 return *log_file_name;
807 return std::wstring(); 807 return std::wstring();
808 } 808 }
809 #endif 809 #endif
810 810
811 } // namespace logging 811 } // namespace logging
812 812
813 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 813 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
814 return out << base::WideToUTF8(std::wstring(wstr)); 814 return out << base::WideToUTF8(std::wstring(wstr));
815 } 815 }
OLDNEW
« base/logging.h ('K') | « base/logging.h ('k') | base/logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698