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

Side by Side Diff: chrome/common/logging_chrome.cc

Issue 6100007: Revert 70782 - Made logging not look up --enable-dcheck from command line... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 // Need to include this before most other files because it defines 7 // Need to include this before most other files because it defines
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
10 // ViewMsgLog et al. functions. 10 // ViewMsgLog et al. functions.
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // indicates the start of a new session. 255 // indicates the start of a new session.
256 FilePath target_path = SetUpSymlinkIfNeeded( 256 FilePath target_path = SetUpSymlinkIfNeeded(
257 log_path, delete_old_log_file == logging::DELETE_OLD_LOG_FILE); 257 log_path, delete_old_log_file == logging::DELETE_OLD_LOG_FILE);
258 258
259 // Because ChromeOS manages the move to a new session by redirecting 259 // Because ChromeOS manages the move to a new session by redirecting
260 // the link, it shouldn't remove the old file in the logging code, 260 // the link, it shouldn't remove the old file in the logging code,
261 // since that will remove the newly created link instead. 261 // since that will remove the newly created link instead.
262 delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE; 262 delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE;
263 #endif 263 #endif
264 264
265 logging::DcheckState dcheck_state =
266 command_line.HasSwitch(switches::kEnableDCHECK) ?
267 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS :
268 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
269
270 bool success = InitLogging(log_path.value().c_str(), 265 bool success = InitLogging(log_path.value().c_str(),
271 DetermineLogMode(command_line), 266 DetermineLogMode(command_line),
272 logging::LOCK_LOG_FILE, 267 logging::LOCK_LOG_FILE,
273 delete_old_log_file, 268 delete_old_log_file);
274 dcheck_state);
275 269
276 #if defined(OS_CHROMEOS) 270 #if defined(OS_CHROMEOS)
277 if (!success) { 271 if (!success) {
278 PLOG(ERROR) << "Unable to initialize logging to " << log_path.value() 272 PLOG(ERROR) << "Unable to initialize logging to " << log_path.value()
279 << " (which should be a link to " << target_path.value() << ")"; 273 << " (which should be a link to " << target_path.value() << ")";
280 RemoveSymlinkAndLog(log_path, target_path); 274 RemoveSymlinkAndLog(log_path, target_path);
281 return; 275 return;
282 } 276 }
283 #else 277 #else
284 if (!success) { 278 if (!success) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 assertions->push_back(wide_line); 384 assertions->push_back(wide_line);
391 ++assertion_count; 385 ++assertion_count;
392 } 386 }
393 } 387 }
394 log_file.close(); 388 log_file.close();
395 389
396 return assertion_count; 390 return assertion_count;
397 } 391 }
398 392
399 } // namespace logging 393 } // namespace logging
OLDNEW
« no previous file with comments | « chrome/browser/sync/tools/sync_listen_notifications.cc ('k') | chrome/installer/util/logging_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698