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

Side by Side Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 16519003: Define a LoggingSettings struct to use for InitLogging() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 7 years, 6 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) 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 "chrome_frame/test/net/fake_external_tab.h" 5 #include "chrome_frame/test/net/fake_external_tab.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <exdisp.h> 9 #include <exdisp.h>
10 #include <Winsock2.h> 10 #include <Winsock2.h>
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 FROM_HERE, 720 FROM_HERE,
721 base::Bind(&CFUrlRequestUnittestRunner::OnIEShutdownFailure, 721 base::Bind(&CFUrlRequestUnittestRunner::OnIEShutdownFailure,
722 base::Unretained(this)), 722 base::Unretained(this)),
723 TestTimeouts::action_max_timeout()); 723 TestTimeouts::action_max_timeout());
724 } 724 }
725 725
726 void CFUrlRequestUnittestRunner::InitializeLogging() { 726 void CFUrlRequestUnittestRunner::InitializeLogging() {
727 base::FilePath exe; 727 base::FilePath exe;
728 PathService::Get(base::FILE_EXE, &exe); 728 PathService::Get(base::FILE_EXE, &exe);
729 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); 729 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log"));
730 logging::InitLogging( 730 logging::LoggingSettings settings;
731 log_filename.value().c_str(), 731 settings.logging_dest = logging::LOG_TO_ALL;
732 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, 732 settings.log_file = log_filename.value().c_str();
733 logging::LOCK_LOG_FILE, 733 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
734 logging::DELETE_OLD_LOG_FILE, 734 logging::InitLogging(settings);
735 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
736 // We want process and thread IDs because we may have multiple processes. 735 // We want process and thread IDs because we may have multiple processes.
737 // Note: temporarily enabled timestamps in an effort to catch bug 6361. 736 // Note: temporarily enabled timestamps in an effort to catch bug 6361.
738 logging::SetLogItems(true, true, true, true); 737 logging::SetLogItems(true, true, true, true);
739 } 738 }
740 739
741 void CFUrlRequestUnittestRunner::CancelInitializationTimeout() { 740 void CFUrlRequestUnittestRunner::CancelInitializationTimeout() {
742 timeout_closure_.Cancel(); 741 timeout_closure_.Cancel();
743 } 742 }
744 743
745 void CFUrlRequestUnittestRunner::StartInitializationTimeout() { 744 void CFUrlRequestUnittestRunner::StartInitializationTimeout() {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 content::InitializeSandboxInfo(&sandbox_info); 976 content::InitializeSandboxInfo(&sandbox_info);
978 FakeMainDelegate delegate; 977 FakeMainDelegate delegate;
979 content::ContentMain( 978 content::ContentMain(
980 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), 979 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)),
981 &sandbox_info, 980 &sandbox_info,
982 &delegate); 981 &delegate);
983 982
984 // Note: In debug builds, we ExitProcess during PostDestroyThreads. 983 // Note: In debug builds, we ExitProcess during PostDestroyThreads.
985 return g_test_suite->test_result(); 984 return g_test_suite->test_result();
986 } 985 }
OLDNEW
« no previous file with comments | « chrome_frame/crash_reporting/minidump_test.cc ('k') | cloud_print/gcp20/prototype/gcp20_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698