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

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: Address comments 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 FROM_HERE, 717 FROM_HERE,
718 base::Bind(&CFUrlRequestUnittestRunner::OnIEShutdownFailure, 718 base::Bind(&CFUrlRequestUnittestRunner::OnIEShutdownFailure,
719 base::Unretained(this)), 719 base::Unretained(this)),
720 TestTimeouts::action_max_timeout()); 720 TestTimeouts::action_max_timeout());
721 } 721 }
722 722
723 void CFUrlRequestUnittestRunner::InitializeLogging() { 723 void CFUrlRequestUnittestRunner::InitializeLogging() {
724 base::FilePath exe; 724 base::FilePath exe;
725 PathService::Get(base::FILE_EXE, &exe); 725 PathService::Get(base::FILE_EXE, &exe);
726 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); 726 base::FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log"));
727 logging::InitLogging( 727 logging::LoggingSettings settings;
728 log_filename.value().c_str(), 728 settings.logging_dest = logging::LOG_TO_ALL;
729 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, 729 settings.log_file = log_filename.value().c_str();
730 logging::LOCK_LOG_FILE, 730 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
731 logging::DELETE_OLD_LOG_FILE, 731 logging::InitLogging(settings);
732 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
733 // We want process and thread IDs because we may have multiple processes. 732 // We want process and thread IDs because we may have multiple processes.
734 // Note: temporarily enabled timestamps in an effort to catch bug 6361. 733 // Note: temporarily enabled timestamps in an effort to catch bug 6361.
735 logging::SetLogItems(true, true, true, true); 734 logging::SetLogItems(true, true, true, true);
736 } 735 }
737 736
738 void CFUrlRequestUnittestRunner::CancelInitializationTimeout() { 737 void CFUrlRequestUnittestRunner::CancelInitializationTimeout() {
739 timeout_closure_.Cancel(); 738 timeout_closure_.Cancel();
740 } 739 }
741 740
742 void CFUrlRequestUnittestRunner::StartInitializationTimeout() { 741 void CFUrlRequestUnittestRunner::StartInitializationTimeout() {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 content::InitializeSandboxInfo(&sandbox_info); 973 content::InitializeSandboxInfo(&sandbox_info);
975 FakeMainDelegate delegate; 974 FakeMainDelegate delegate;
976 content::ContentMain( 975 content::ContentMain(
977 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), 976 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)),
978 &sandbox_info, 977 &sandbox_info,
979 &delegate); 978 &delegate);
980 979
981 // Note: In debug builds, we ExitProcess during PostDestroyThreads. 980 // Note: In debug builds, we ExitProcess during PostDestroyThreads.
982 return g_test_suite->test_result(); 981 return g_test_suite->test_result();
983 } 982 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698