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

Side by Side Diff: base/logging.cc

Issue 645133002: Prefix CommandLine usege with base namespace (Part 1: base/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated #3 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
« no previous file with comments | « base/i18n/build_utf8_validator_tables.cc ('k') | base/process/process_util_unittest.cc » ('j') | 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 : logging_dest(LOG_DEFAULT), 352 : logging_dest(LOG_DEFAULT),
353 log_file(NULL), 353 log_file(NULL),
354 lock_log(LOCK_LOG_FILE), 354 lock_log(LOCK_LOG_FILE),
355 delete_old(APPEND_TO_OLD_LOG_FILE) {} 355 delete_old(APPEND_TO_OLD_LOG_FILE) {}
356 356
357 bool BaseInitLoggingImpl(const LoggingSettings& settings) { 357 bool BaseInitLoggingImpl(const LoggingSettings& settings) {
358 #if defined(OS_NACL) 358 #if defined(OS_NACL)
359 // Can log only to the system debug log. 359 // Can log only to the system debug log.
360 CHECK_EQ(settings.logging_dest & ~LOG_TO_SYSTEM_DEBUG_LOG, 0); 360 CHECK_EQ(settings.logging_dest & ~LOG_TO_SYSTEM_DEBUG_LOG, 0);
361 #endif 361 #endif
362 CommandLine* command_line = CommandLine::ForCurrentProcess(); 362 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
363 // Don't bother initializing g_vlog_info unless we use one of the 363 // Don't bother initializing g_vlog_info unless we use one of the
364 // vlog switches. 364 // vlog switches.
365 if (command_line->HasSwitch(switches::kV) || 365 if (command_line->HasSwitch(switches::kV) ||
366 command_line->HasSwitch(switches::kVModule)) { 366 command_line->HasSwitch(switches::kVModule)) {
367 // NOTE: If g_vlog_info has already been initialized, it might be in use 367 // NOTE: If g_vlog_info has already been initialized, it might be in use
368 // by another thread. Don't delete the old VLogInfo, just create a second 368 // by another thread. Don't delete the old VLogInfo, just create a second
369 // one. We keep track of both to avoid memory leak warnings. 369 // one. We keep track of both to avoid memory leak warnings.
370 CHECK(!g_vlog_info_prev); 370 CHECK(!g_vlog_info_prev);
371 g_vlog_info_prev = g_vlog_info; 371 g_vlog_info_prev = g_vlog_info;
372 372
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 return *log_file_name; 803 return *log_file_name;
804 return std::wstring(); 804 return std::wstring();
805 } 805 }
806 #endif 806 #endif
807 807
808 } // namespace logging 808 } // namespace logging
809 809
810 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 810 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
811 return out << base::WideToUTF8(std::wstring(wstr)); 811 return out << base::WideToUTF8(std::wstring(wstr));
812 } 812 }
OLDNEW
« no previous file with comments | « base/i18n/build_utf8_validator_tables.cc ('k') | base/process/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698