diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 20:30:45 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 20:30:45 +0000 |
commit | 2b9a9f16465b34ee13e09e9b93086f75c925d3ac (patch) | |
tree | 1ee43ab289f8a3e9c787c954542d36a1484d177b | |
parent | 0cce0b0cef0b6dd04d1fe58f811ab64721fb96a9 (diff) | |
download | chromium_src-2b9a9f16465b34ee13e09e9b93086f75c925d3ac.zip chromium_src-2b9a9f16465b34ee13e09e9b93086f75c925d3ac.tar.gz chromium_src-2b9a9f16465b34ee13e09e9b93086f75c925d3ac.tar.bz2 |
Convert LOG(INFO) to VLOG(1) - chrome_frame/.
Plus a couple misc. cleanups.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3850002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63095 0039d316-1c4b-4281-b951-d872f2087c98
38 files changed, 358 insertions, 359 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc index 68342b9..a8e31a7 100644 --- a/chrome_frame/bho.cc +++ b/chrome_frame/bho.cc @@ -118,7 +118,7 @@ STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url, return S_OK; } - DLOG(INFO) << "BeforeNavigate2: " << url->bstrVal; + DVLOG(1) << "BeforeNavigate2: " << url->bstrVal; ScopedComPtr<IBrowserService> browser_service; DoQueryService(SID_SShellBrowser, web_browser2, browser_service.Receive()); @@ -140,11 +140,11 @@ STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url, } STDMETHODIMP_(void) Bho::NavigateComplete2(IDispatch* dispatch, VARIANT* url) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; } STDMETHODIMP_(void) Bho::DocumentComplete(IDispatch* dispatch, VARIANT* url) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; ScopedComPtr<IWebBrowser2> web_browser2; if (dispatch) @@ -245,7 +245,7 @@ bool DocumentHasEmbeddedItems(IUnknown* browser) { HRESULT Bho::OnHttpEquiv(IBrowserService_OnHttpEquiv_Fn original_httpequiv, IBrowserService* browser, IShellView* shell_view, BOOL done, VARIANT* in_arg, VARIANT* out_arg) { - DLOG(INFO) << __FUNCTION__ << " done:" << done; + DVLOG(1) << __FUNCTION__ << " done:" << done; // OnHttpEquiv with 'done' set to TRUE is called for all pages. // 0 or more calls with done set to FALSE are made. @@ -265,8 +265,8 @@ HRESULT Bho::OnHttpEquiv(IBrowserService_OnHttpEquiv_Fn original_httpequiv, if (!DocumentHasEmbeddedItems(browser)) { NavigationManager* mgr = NavigationManager::GetThreadInstance(); DCHECK(mgr); - DLOG(INFO) << "Found tag in page. Marking browser." << - base::StringPrintf(" tid=0x%08X", ::GetCurrentThreadId()); + DVLOG(1) << "Found tag in page. Marking browser." + << base::StringPrintf(" tid=0x%08X", ::GetCurrentThreadId()); if (mgr) { // TODO(tommi): See if we can't figure out a cleaner way to avoid // this. For some documents we can hit a problem here. When we @@ -304,7 +304,7 @@ void Bho::ProcessOptInUrls(IWebBrowser2* browser, BSTR url) { if (IsValidUrlScheme(GURL(current_url), false)) { bool cf_protocol = StartsWith(current_url, kChromeProtocolPrefix, false); if (!cf_protocol && IsChrome(RendererTypeForUrl(current_url))) { - DLOG(INFO) << "Opt-in URL. Switching to cf."; + DVLOG(1) << "Opt-in URL. Switching to cf."; ScopedComPtr<IBrowserService> browser_service; DoQueryService(SID_SShellBrowser, browser, browser_service.Receive()); DCHECK(browser_service) << "DoQueryService - SID_SShellBrowser failed."; diff --git a/chrome_frame/bind_status_callback_impl.cc b/chrome_frame/bind_status_callback_impl.cc index b9fa0c0..c85825d2 100644 --- a/chrome_frame/bind_status_callback_impl.cc +++ b/chrome_frame/bind_status_callback_impl.cc @@ -9,11 +9,11 @@ #include "base/stringprintf.h" BSCBImpl::BSCBImpl() { - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); } BSCBImpl::~BSCBImpl() { - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); } std::string BSCBImpl::me() { @@ -75,8 +75,8 @@ HRESULT BSCBImpl::QueryService(REFGUID service, REFIID iid, void** object) { // IBindStatusCallback HRESULT BSCBImpl::OnStartBinding(DWORD reserved, IBinding* binding) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) hr = delegate_->OnStartBinding(reserved, binding); @@ -84,8 +84,8 @@ HRESULT BSCBImpl::OnStartBinding(DWORD reserved, IBinding* binding) { } HRESULT BSCBImpl::GetPriority(LONG* priority) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) hr = delegate_->GetPriority(priority); @@ -93,8 +93,8 @@ HRESULT BSCBImpl::GetPriority(LONG* priority) { } HRESULT BSCBImpl::OnLowResource(DWORD reserved) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) hr = delegate_->OnLowResource(reserved); @@ -103,9 +103,9 @@ HRESULT BSCBImpl::OnLowResource(DWORD reserved) { HRESULT BSCBImpl::OnProgress(ULONG progress, ULONG progress_max, ULONG status_code, LPCWSTR status_text) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf( - " status=%i tid=%i %ls", status_code, PlatformThread::CurrentId(), - status_text); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" status=%i tid=%i %ls", status_code, + PlatformThread::CurrentId(), status_text); HRESULT hr = S_OK; if (delegate_) delegate_->OnProgress(progress, progress_max, status_code, status_text); @@ -113,8 +113,9 @@ HRESULT BSCBImpl::OnProgress(ULONG progress, ULONG progress_max, } HRESULT BSCBImpl::OnStopBinding(HRESULT hresult, LPCWSTR error) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf( - " hr=0x%08X '%ls' tid=%i", hresult, error, PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" hr=0x%08X '%ls' tid=%i", hresult, error, + PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) delegate_->OnStopBinding(hresult, error); @@ -122,8 +123,8 @@ HRESULT BSCBImpl::OnStopBinding(HRESULT hresult, LPCWSTR error) { } HRESULT BSCBImpl::GetBindInfo(DWORD* bindf, BINDINFO* bind_info) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) delegate_->GetBindInfo(bindf, bind_info); @@ -132,8 +133,8 @@ HRESULT BSCBImpl::GetBindInfo(DWORD* bindf, BINDINFO* bind_info) { HRESULT BSCBImpl::OnDataAvailable(DWORD bscf, DWORD size, FORMATETC* format_etc, STGMEDIUM* stgmed) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) hr = delegate_->OnDataAvailable(bscf, size, format_etc, stgmed); @@ -141,8 +142,8 @@ HRESULT BSCBImpl::OnDataAvailable(DWORD bscf, DWORD size, } HRESULT BSCBImpl::OnObjectAvailable(REFIID iid, IUnknown* unk) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) delegate_->OnObjectAvailable(iid, unk); @@ -152,8 +153,8 @@ HRESULT BSCBImpl::OnObjectAvailable(REFIID iid, IUnknown* unk) { // IBindStatusCallbackEx HRESULT BSCBImpl::GetBindInfoEx(DWORD* bindf, BINDINFO* bind_info, DWORD* bindf2, DWORD* reserved) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) { ScopedComPtr<IBindStatusCallbackEx> bscbex; @@ -167,8 +168,8 @@ HRESULT BSCBImpl::GetBindInfoEx(DWORD* bindf, BINDINFO* bind_info, HRESULT BSCBImpl::BeginningTransaction(LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR* additional_headers) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) { @@ -187,8 +188,8 @@ HRESULT BSCBImpl::BeginningTransaction(LPCWSTR url, LPCWSTR headers, HRESULT BSCBImpl::OnResponse(DWORD response_code, LPCWSTR response_headers, LPCWSTR request_headers, LPWSTR* additional_headers) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); HRESULT hr = S_OK; if (delegate_) { diff --git a/chrome_frame/buggy_bho_handling.cc b/chrome_frame/buggy_bho_handling.cc index 746f56a..c32a5c6 100644 --- a/chrome_frame/buggy_bho_handling.cc +++ b/chrome_frame/buggy_bho_handling.cc @@ -103,7 +103,7 @@ STDMETHODIMP BuggyBhoTls::BuggyBhoInvoke(InvokeFunc original, IDispatch* me, WORD flags, DISPPARAMS* params, VARIANT* result, EXCEPINFO* ei, UINT* err) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; const BuggyBhoTls* tls = BuggyBhoTls::FromCurrentThread(); if (tls && tls->IsBuggyObject(me)) { diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index 9b24507..3c19071 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -76,8 +76,7 @@ HRESULT ChromeActiveDocument::FinalConstruct() { if (cached_document && cached_document->IsValid()) { DCHECK(automation_client_.get() == NULL); automation_client_.swap(cached_document->automation_client_); - DLOG(INFO) << "Reusing automation client instance from " - << cached_document; + DVLOG(1) << "Reusing automation client instance from " << cached_document; DCHECK(automation_client_.get() != NULL); automation_client_->Reinitialize(this, url_fetcher_.get()); is_automation_client_reused_ = true; @@ -122,7 +121,7 @@ HRESULT ChromeActiveDocument::FinalConstruct() { } ChromeActiveDocument::~ChromeActiveDocument() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (find_dialog_.IsWindow()) find_dialog_.DestroyWindow(); // ChromeFramePlugin @@ -171,12 +170,12 @@ STDMETHODIMP ChromeActiveDocument::DoVerb(LONG verb, // Override IOleInPlaceActiveObjectImpl::OnDocWindowActivate STDMETHODIMP ChromeActiveDocument::OnDocWindowActivate(BOOL activate) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } STDMETHODIMP ChromeActiveDocument::TranslateAccelerator(MSG* msg) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (msg == NULL) return E_POINTER; @@ -194,7 +193,7 @@ STDMETHODIMP ChromeActiveDocument::TranslateAccelerator(MSG* msg) { } // Override IPersistStorageImpl::IsDirty STDMETHODIMP ChromeActiveDocument::IsDirty() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_FALSE; } @@ -330,7 +329,7 @@ STDMETHODIMP ChromeActiveDocument::QueryStatus(const GUID* cmd_group_guid, ULONG number_of_commands, OLECMD commands[], OLECMDTEXT* command_text) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; CommandStatusMap* command_map = NULL; @@ -349,14 +348,13 @@ STDMETHODIMP ChromeActiveDocument::QueryStatus(const GUID* cmd_group_guid, } if (!command_map) { - DLOG(INFO) << "unsupported command group: " - << GuidToString(*cmd_group_guid); + DVLOG(1) << "unsupported command group: " << GuidToString(*cmd_group_guid); return OLECMDERR_E_NOTSUPPORTED; } for (ULONG command_index = 0; command_index < number_of_commands; command_index++) { - DLOG(INFO) << "Command id = " << commands[command_index].cmdID; + DVLOG(1) << "Command id = " << commands[command_index].cmdID; CommandStatusMap::iterator index = command_map->find(commands[command_index].cmdID); if (index != command_map->end()) @@ -370,7 +368,7 @@ STDMETHODIMP ChromeActiveDocument::Exec(const GUID* cmd_group_guid, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args) { - DLOG(INFO) << __FUNCTION__ << " Cmd id =" << command_id; + DVLOG(1) << __FUNCTION__ << " Cmd id =" << command_id; // Bail out if we have been uninitialized. if (automation_client_.get() && automation_client_->tab()) { return ProcessExecCommand(cmd_group_guid, command_id, cmd_exec_opt, @@ -606,11 +604,13 @@ HRESULT ChromeActiveDocument::ActiveXDocActivate(LONG verb) { void ChromeActiveDocument::OnNavigationStateChanged(int tab_handle, int flags, const IPC::NavigationInfo& nav_info) { // TODO(joshia): handle INVALIDATE_TAB,INVALIDATE_LOAD etc. - DLOG(INFO) << __FUNCTION__ << std::endl << " Flags: " << flags - << "Url: " << nav_info.url << - ", Title: " << nav_info.title << - ", Type: " << nav_info.navigation_type << ", Relative Offset: " << - nav_info.relative_offset << ", Index: " << nav_info.navigation_index; + DVLOG(1) << __FUNCTION__ + << "\n Flags: " << flags + << ", Url: " << nav_info.url + << ", Title: " << nav_info.title + << ", Type: " << nav_info.navigation_type + << ", Relative Offset: " << nav_info.relative_offset + << ", Index: " << nav_info.navigation_index; UpdateNavigationState(nav_info); } @@ -649,12 +649,12 @@ void ChromeActiveDocument::OnAcceleratorPressed(int tab_handle, BaseActiveX::OnAcceleratorPressed(tab_handle, accel_message); } } else { - DLOG(INFO) << "IE handled accel key " << accel_message.wParam; + DVLOG(1) << "IE handled accel key " << accel_message.wParam; } } void ChromeActiveDocument::OnTabbedOut(int tab_handle, bool reverse) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (in_place_frame_) { MSG msg = { NULL, WM_KEYDOWN, VK_TAB }; in_place_frame_->TranslateAcceleratorW(&msg, 0); @@ -663,17 +663,19 @@ void ChromeActiveDocument::OnTabbedOut(int tab_handle, bool reverse) { void ChromeActiveDocument::OnDidNavigate(int tab_handle, const IPC::NavigationInfo& nav_info) { - DLOG(INFO) << __FUNCTION__ << std::endl << "Url: " << nav_info.url << - ", Title: " << nav_info.title << - ", Type: " << nav_info.navigation_type << ", Relative Offset: " << - nav_info.relative_offset << ", Index: " << nav_info.navigation_index; + DVLOG(1) << __FUNCTION__ << std::endl + << "Url: " << nav_info.url + << ", Title: " << nav_info.title + << ", Type: " << nav_info.navigation_type + << ", Relative Offset: " << nav_info.relative_offset + << ", Index: " << nav_info.navigation_index; CrashMetricsReporter::GetInstance()->IncrementMetric( CrashMetricsReporter::CHROME_FRAME_NAVIGATION_COUNT); // This could be NULL if the active document instance is being destroyed. if (!m_spInPlaceSite) { - DLOG(INFO) << __FUNCTION__ << "m_spInPlaceSite is NULL. Returning"; + DVLOG(1) << __FUNCTION__ << "m_spInPlaceSite is NULL. Returning"; return; } @@ -1050,7 +1052,7 @@ bool ChromeActiveDocument::LaunchUrl(const ChromeFrameUrl& cf_url, HRESULT ChromeActiveDocument::OnRefreshPage(const GUID* cmd_group_guid, DWORD command_id, DWORD cmd_exec_opt, VARIANT* in_args, VARIANT* out_args) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; popup_allowed_ = false; if (in_args->vt == VT_I4 && in_args->lVal & OLECMDIDF_REFRESH_PAGEACTION_POPUPWINDOW) { @@ -1183,7 +1185,7 @@ HRESULT ChromeActiveDocument::OnEncodingChange(const GUID* cmd_group_guid, void ChromeActiveDocument::OnGoToHistoryEntryOffset(int tab_handle, int offset) { - DLOG(INFO) << __FUNCTION__ << " - offset:" << offset; + DVLOG(1) << __FUNCTION__ << " - offset:" << offset; ScopedComPtr<IBrowserService> browser_service; ScopedComPtr<ITravelLog> travel_log; @@ -1290,9 +1292,8 @@ void ChromeActiveDocument::SetWindowDimensions() { web_browser2.Receive()); if (!web_browser2) return; - DLOG(INFO) << "this:" << this; - DLOG(INFO) << "dimensions: width:" << dimensions_.width() - << "height:" << dimensions_.height(); + DVLOG(1) << "this:" << this << "\ndimensions: width:" << dimensions_.width() + << " height:" << dimensions_.height(); if (!dimensions_.IsEmpty()) { web_browser2->put_Width(dimensions_.width()); web_browser2->put_Height(dimensions_.height()); diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc index dcc5469..ad405d3 100644 --- a/chrome_frame/chrome_frame_activex.cc +++ b/chrome_frame/chrome_frame_activex.cc @@ -205,7 +205,7 @@ void ChromeFrameActivex::OnMessageFromChromeFrame(int tab_handle, const std::string& message, const std::string& origin, const std::string& target) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (target.compare("*") != 0) { bool drop = true; @@ -335,12 +335,12 @@ STDMETHODIMP ChromeFrameActivex::Load(IPropertyBag* bag, IErrorLog* error_log) { << base::StringPrintf(L"hr=0x%08X, vt=%i", hr, value.type()); } else { - DLOG(INFO) << "script block created for event " << prop << - base::StringPrintf(" (0x%08X)", hr) << " connections: " << + DVLOG(1) << "script block created for event " << prop + << base::StringPrintf(" (0x%08X)", hr) << " connections: " << ProxyDIChromeFrameEvents<ChromeFrameActivex>::m_vec.GetSize(); } } else { - DLOG(INFO) << "event property " << prop << " not in property bag"; + DVLOG(1) << "event property " << prop << " not in property bag"; } } @@ -633,7 +633,7 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() { } if (NavigationManager::GetThreadInstance() != NULL) { - DLOG(INFO) << "BHO already loaded"; + DVLOG(1) << "BHO already loaded"; return S_OK; } diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index e5b1097..264621f 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -283,7 +283,7 @@ END_MSG_MAP() #ifndef NDEBUG wchar_t buffer[64] = {0}; ::StringFromGUID2(riid, buffer, arraysize(buffer)); - DLOG(INFO) << "E_NOINTERFACE: " << buffer; + DVLOG(1) << "E_NOINTERFACE: " << buffer; #endif return E_NOINTERFACE; } @@ -403,7 +403,7 @@ END_MSG_MAP() } else { ChromeFramePlugin::GetProfilePath(profile_name, profile_path); } - DLOG(INFO) << __FUNCTION__ << ": " << profile_path->value(); + DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); } @@ -532,7 +532,7 @@ END_MSG_MAP() LRESULT OnDestroy(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) { // NO_LINT - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return 0; } @@ -548,7 +548,7 @@ END_MSG_MAP() // ChromeFrameDelegate override virtual void OnAutomationServerLaunchFailed( AutomationLaunchResult reason, const std::string& server_version) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (reason == AUTOMATION_SERVER_CRASHED) draw_sad_tab_ = true; @@ -678,7 +678,7 @@ END_MSG_MAP() } STDMETHOD(get_readyState)(long* ready_state) { // NOLINT - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(ready_state); if (!ready_state) @@ -1075,8 +1075,8 @@ END_MSG_MAP() if (hr != S_OK) hr = AllowFrameToTranslateAccelerator(accel_message); - DLOG(INFO) << __FUNCTION__ << " browser response: " - << base::StringPrintf("0x%08x", hr); + DVLOG(1) << __FUNCTION__ << " browser response: " + << base::StringPrintf("0x%08x", hr); if (hr != S_OK) { // The WM_SYSCHAR message is not processed by the IOleControlSite diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index d49c8fb..7c79287 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -223,7 +223,7 @@ AutomationProxyCacheEntry::AutomationProxyCacheEntry( } AutomationProxyCacheEntry::~AutomationProxyCacheEntry() { - DLOG(INFO) << __FUNCTION__ << profile_name; + DVLOG(1) << __FUNCTION__ << profile_name; // Attempt to fix chrome_frame_tests crash seen at times on the IE6/IE7 // builders. It appears that there are cases when we can enter here when the // AtExitManager is tearing down the global ProxyCache which causes a crash @@ -295,7 +295,7 @@ void AutomationProxyCacheEntry::CreateProxy(ChromeFrameLaunchParams* params, if (IsAccessibleMode()) command_line->AppendSwitch(switches::kForceRendererAccessibility); - DLOG(INFO) << "Profile path: " << params->profile_path().value(); + DVLOG(1) << "Profile path: " << params->profile_path().value(); command_line->AppendSwitchPath(switches::kUserDataDir, params->profile_path()); @@ -471,7 +471,7 @@ void ProxyFactory::GetAutomationServer( } if (entry == NULL) { - DLOG(INFO) << __FUNCTION__ << " creating new proxy entry"; + DVLOG(1) << __FUNCTION__ << " creating new proxy entry"; entry = new AutomationProxyCacheEntry(params, delegate); proxies_.container().push_back(entry); @@ -1002,7 +1002,7 @@ void ChromeFrameAutomationClient::LaunchComplete( DCHECK(init_state_ == INITIALIZING); automation_server_ = proxy; } else { - DLOG(INFO) << "Not storing automation server pointer due to shutting down"; + DVLOG(1) << "Not storing automation server pointer due to shutting down"; } if (result == AUTOMATION_SUCCESS) { @@ -1025,7 +1025,7 @@ void ChromeFrameAutomationClient::LaunchComplete( automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); - DLOG(INFO) << __FUNCTION__ << ": sending CreateExternalTabComplete"; + DVLOG(1) << __FUNCTION__ << ": sending CreateExternalTabComplete"; } } } else { diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h index 0a98f84..5227c2b 100644 --- a/chrome_frame/chrome_frame_delegate.h +++ b/chrome_frame/chrome_frame_delegate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -149,7 +149,7 @@ template <class T> class TaskMarshallerThroughWindowsMessages PushTask(task); this_ptr->PostMessage(MSG_EXECUTE_TASK, reinterpret_cast<WPARAM>(task)); } else { - DLOG(INFO) << "Dropping MSG_EXECUTE_TASK message for destroyed window."; + DVLOG(1) << "Dropping MSG_EXECUTE_TASK message for destroyed window."; delete task; } } diff --git a/chrome_frame/chrome_frame_npapi.cc b/chrome_frame/chrome_frame_npapi.cc index 93b53b0..df55bf3 100644 --- a/chrome_frame/chrome_frame_npapi.cc +++ b/chrome_frame/chrome_frame_npapi.cc @@ -425,9 +425,9 @@ void ChromeFrameNPAPI::UrlNotify(const char* url, NPReason reason, void ChromeFrameNPAPI::OnAcceleratorPressed(int tab_handle, const MSG& accel_message) { - DLOG(INFO) << __FUNCTION__ << " msg:" - << base::StringPrintf("0x%04X", accel_message.message) << " key:" - << accel_message.wParam; + DVLOG(1) << __FUNCTION__ + << " msg:" << base::StringPrintf("0x%04X", accel_message.message) + << " key:" << accel_message.wParam; // The host browser does call TranslateMessage on messages like WM_KEYDOWN // WM_KEYUP, etc, which will result in messages like WM_CHAR, WM_SYSCHAR, etc @@ -455,7 +455,7 @@ void ChromeFrameNPAPI::OnAcceleratorPressed(int tab_handle, } void ChromeFrameNPAPI::OnTabbedOut(int tab_handle, bool reverse) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; ignore_setfocus_ = true; HWND parent = ::GetParent(m_hWnd); @@ -731,13 +731,13 @@ bool ChromeFrameNPAPI::SetProperty(NPObject* object, NPIdentifier name, } void ChromeFrameNPAPI::OnFocus() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; PostMessage(WM_SETFOCUS, 0, 0); } void ChromeFrameNPAPI::OnEvent(const char* event_name) { DCHECK(event_name); - DLOG(INFO) << event_name; + DVLOG(1) << event_name; if (lstrcmpiA(event_name, "focus") == 0) { OnFocus(); @@ -778,11 +778,11 @@ LRESULT ChromeFrameNPAPI::OnSetFocus(UINT message, WPARAM wparam, } void ChromeFrameNPAPI::OnBlur() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; } void ChromeFrameNPAPI::OnLoad(int, const GURL& gurl) { - DLOG(INFO) << "Firing onload"; + DVLOG(1) << "Firing onload"; FireEvent("load", gurl.spec()); } diff --git a/chrome_frame/chrome_frame_npapi_entrypoints.cc b/chrome_frame/chrome_frame_npapi_entrypoints.cc index ef5af01..267aba5 100644 --- a/chrome_frame/chrome_frame_npapi_entrypoints.cc +++ b/chrome_frame/chrome_frame_npapi_entrypoints.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -15,7 +15,7 @@ extern "C" { } NPError NPAPI NP_Initialize(NPNetscapeFuncs* browser_funcs) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; _pAtlModule->Lock(); npapi::InitializeBrowserFunctions(browser_funcs); return NPERR_NO_ERROR; @@ -41,7 +41,7 @@ NPError NPAPI NP_GetEntryPoints(NPPluginFuncs* plugin_funcs) { } void NPAPI NP_Shutdown() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; npapi::UninitializeBrowserFunctions(); diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h index 9f483bc..27e192e 100644 --- a/chrome_frame/chrome_frame_plugin.h +++ b/chrome_frame/chrome_frame_plugin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -39,7 +39,7 @@ BEGIN_MSG_MAP(T) END_MSG_MAP() bool Initialize() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(!automation_client_.get()); automation_client_ = CreateAutomationClient(); if (!automation_client_.get()) { @@ -51,7 +51,7 @@ END_MSG_MAP() } void Uninitialize() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (IsValid()) { automation_client_->Uninitialize(); automation_client_ = NULL; @@ -232,9 +232,8 @@ END_MSG_MAP() TabProxy* tab = automation_client_->tab(); HWND chrome_window = automation_client_->tab_window(); if (tab && ::IsWindow(chrome_window)) { - DLOG(INFO) << "Setting initial focus"; - tab->SetInitialFocus(win_util::IsShiftPressed(), - restore_focus_to_view); + DVLOG(1) << "Setting initial focus"; + tab->SetInitialFocus(win_util::IsShiftPressed(), restore_focus_to_view); } } } @@ -243,7 +242,7 @@ END_MSG_MAP() FilePath* profile_path) { chrome::GetChromeFrameUserDataDirectory(profile_path); *profile_path = profile_path->Append(profile_name); - DLOG(INFO) << __FUNCTION__ << ": " << profile_path->value(); + DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); } protected: diff --git a/chrome_frame/chrome_protocol.cc b/chrome_frame/chrome_protocol.cc index 56b0be7..42683bc 100644 --- a/chrome_frame/chrome_protocol.cc +++ b/chrome_frame/chrome_protocol.cc @@ -16,7 +16,7 @@ STDMETHODIMP ChromeProtocol::Start(LPCWSTR url, IInternetBindInfo* bind_info, DWORD flags, DWORD reserved) { - DLOG(INFO) << __FUNCTION__ << ": URL = " << url; + DVLOG(1) << __FUNCTION__ << ": URL = " << url; prot_sink->ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, kChromeMimeType); prot_sink->ReportData( @@ -31,18 +31,18 @@ STDMETHODIMP ChromeProtocol::Start(LPCWSTR url, // apartment (or user interface) thread. This method is called in response // to a call to IInternetProtocolSink::Switch. STDMETHODIMP ChromeProtocol::Continue(PROTOCOLDATA* protocol_data) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } // Aborts an operation in progress. STDMETHODIMP ChromeProtocol::Abort(HRESULT reason, DWORD options) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } STDMETHODIMP ChromeProtocol::Terminate(DWORD options) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } @@ -57,7 +57,7 @@ STDMETHODIMP ChromeProtocol::Resume() { STDMETHODIMP ChromeProtocol::Read(void* buffer, ULONG buffer_size_in_bytes, ULONG* bytes_read) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_FALSE; } @@ -65,20 +65,20 @@ STDMETHODIMP ChromeProtocol::Read(void* buffer, STDMETHODIMP ChromeProtocol::Seek(LARGE_INTEGER move_by, DWORD origin, ULARGE_INTEGER* new_position) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return E_NOTIMPL; } // Locks the request so that IInternetProtocolRoot::Terminate () // can be called and the remaining data can be read. STDMETHODIMP ChromeProtocol::LockRequest(DWORD options) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } // Frees any resources associated with a lock. Called only if // IInternetProtocol::LockRequest () was called. STDMETHODIMP ChromeProtocol::UnlockRequest() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; return S_OK; } diff --git a/chrome_frame/crash_reporting/minidump_test.cc b/chrome_frame/crash_reporting/minidump_test.cc index 3b4f0e6..3fa6653 100644 --- a/chrome_frame/crash_reporting/minidump_test.cc +++ b/chrome_frame/crash_reporting/minidump_test.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <windows.h> @@ -131,8 +131,8 @@ class MinidumpTest: public testing::Test { &ex_info, NULL, NULL); - LOG(INFO) << "Flags: " << flags << " mindump size: " << - ::GetFileSize(dump_file_handle_.Get(), NULL); + VLOG(1) << "Flags: " << flags << " mindump size: " + << ::GetFileSize(dump_file_handle_.Get(), NULL); return result == TRUE; } @@ -287,8 +287,8 @@ class MinidumpTest: public testing::Test { TEST_F(MinidumpTest, Version) { API_VERSION* version = ::ImagehlpApiVersion(); - LOG(INFO) << "Imagehlp Api Version: " << version->MajorVersion << "." - << version->MinorVersion << "." << version->Revision; + VLOG(1) << "Imagehlp Api Version: " << version->MajorVersion << "." + << version->MinorVersion << "." << version->Revision; HMODULE dbg_help = ::GetModuleHandle(L"dbghelp.dll"); ASSERT_TRUE(dbg_help != NULL); @@ -301,7 +301,7 @@ TEST_F(MinidumpTest, Version) { FileVersionInfo::CreateFileVersionInfo(dbg_help_file)); ASSERT_TRUE(file_info != NULL); - LOG(INFO) << "DbgHelp.dll version: " << file_info->file_version(); + VLOG(1) << "DbgHelp.dll version: " << file_info->file_version(); } TEST_F(MinidumpTest, Normal) { diff --git a/chrome_frame/delete_chrome_history.cc b/chrome_frame/delete_chrome_history.cc index 5745c50..419cfc9 100644 --- a/chrome_frame/delete_chrome_history.cc +++ b/chrome_frame/delete_chrome_history.cc @@ -17,7 +17,7 @@ DeleteChromeHistory::DeleteChromeHistory() : remove_mask_(0) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; } DeleteChromeHistory::~DeleteChromeHistory() { @@ -25,13 +25,13 @@ DeleteChromeHistory::~DeleteChromeHistory() { HRESULT DeleteChromeHistory::FinalConstruct() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; Initialize(); return S_OK; } void DeleteChromeHistory::OnAutomationServerReady() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; automation_client_->RemoveBrowsingData(remove_mask_); loop_.Quit(); } @@ -48,7 +48,7 @@ void DeleteChromeHistory::GetProfilePath(const std::wstring& profile_name, } STDMETHODIMP DeleteChromeHistory::DeleteBrowsingHistory(DWORD flags) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; // Usually called inside a quick startup/tear-down routine by RunDLL32. You // can simulate the process by calling: // RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 diff --git a/chrome_frame/http_negotiate.cc b/chrome_frame/http_negotiate.cc index f68e4ff..13aa8e1 100644 --- a/chrome_frame/http_negotiate.cc +++ b/chrome_frame/http_negotiate.cc @@ -266,7 +266,7 @@ HRESULT HttpNegotiatePatch::PatchHttpNegotiate(IUnknown* to_patch) { HRESULT HttpNegotiatePatch::BeginningTransaction( IHttpNegotiate_BeginningTransaction_Fn original, IHttpNegotiate* me, LPCWSTR url, LPCWSTR headers, DWORD reserved, LPWSTR* additional_headers) { - DLOG(INFO) << __FUNCTION__ << " " << url << " headers:\n" << headers; + DVLOG(1) << __FUNCTION__ << " " << url << " headers:\n" << headers; HRESULT hr = original(me, url, headers, reserved, additional_headers); @@ -297,10 +297,10 @@ HRESULT HttpNegotiatePatch::BeginningTransaction( } } } else { - DLOG(INFO) << "No IWebBrowser2"; + DVLOG(1) << "No IWebBrowser2"; } } else { - DLOG(INFO) << "No NavigationManager"; + DVLOG(1) << "No NavigationManager"; } std::string updated(AppendCFUserAgentString(headers, *additional_headers)); @@ -345,8 +345,8 @@ HRESULT HttpNegotiatePatch::StartBinding( HRESULT HttpNegotiatePatch::ReportProgress( IInternetProtocolSink_ReportProgress_Fn original, IInternetProtocolSink* me, ULONG status_code, LPCWSTR status_text) { - DLOG(INFO) << __FUNCTION__ - << base::StringPrintf(" %i %ls", status_code, status_text); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf(" %i %ls", status_code, status_text); bool updated_mime_type = false; if (status_code == BINDSTATUS_MIMETYPEAVAILABLE || @@ -409,11 +409,11 @@ HRESULT HttpNegotiatePatch::ReportProgress( if (render_in_chrome_frame) { if (IsTextHtmlMimeType(status_text)) { - DLOG(INFO) << "- changing mime type to " << kChromeMimeType; + DVLOG(1) << "- changing mime type to " << kChromeMimeType; status_text = kChromeMimeType; updated_mime_type = true; } else { - DLOG(INFO) << "- don't want to render " << status_text << " in cf"; + DVLOG(1) << "- don't want to render " << status_text << " in cf"; } } } diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc index 6d51898..461862f 100644 --- a/chrome_frame/metrics_service.cc +++ b/chrome_frame/metrics_service.cc @@ -137,7 +137,7 @@ class ChromeFrameUploadRequestContext : public URLRequestContext { } ~ChromeFrameUploadRequestContext() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; delete http_transaction_factory_; delete http_auth_handler_factory_; } @@ -219,7 +219,7 @@ class ChromeFrameUploadRequestContextGetter : public URLRequestContextGetter { private: ~ChromeFrameUploadRequestContextGetter() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; } scoped_refptr<URLRequestContext> context_; @@ -244,12 +244,12 @@ class ChromeFrameMetricsDataUploader ChromeFrameMetricsDataUploader() : fetcher_(NULL) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; creator_thread_id_ = PlatformThread::CurrentId(); } ~ChromeFrameMetricsDataUploader() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(creator_thread_id_ == PlatformThread::CurrentId()); } @@ -331,11 +331,9 @@ class ChromeFrameMetricsDataUploader int response_code, const ResponseCookies& cookies, const std::string& data) { - DLOG(INFO) << __FUNCTION__ - << base::StringPrintf( - ": url : %hs, status:%d, response code: %d\n", - url.spec().c_str(), status.status(), - response_code); + DVLOG(1) << __FUNCTION__ << base::StringPrintf( + ": url : %hs, status:%d, response code: %d\n", url.spec().c_str(), + status.status(), response_code); delete fetcher_; fetcher_ = NULL; @@ -450,7 +448,7 @@ void CALLBACK MetricsService::TransmissionTimerProc(HWND window, unsigned int message, unsigned int event_id, unsigned int time) { - DLOG(INFO) << "Transmission timer notified"; + DVLOG(1) << "Transmission timer notified"; DCHECK(GetInstance() != NULL); GetInstance()->UploadData(); if (GetInstance()->initial_uma_upload_) { @@ -564,7 +562,7 @@ bool MetricsService::UploadData() { static long currently_uploading = 0; if (InterlockedCompareExchange(¤tly_uploading, 1, 0)) { - DLOG(INFO) << "Contention for uploading metrics data. Backing off"; + DVLOG(1) << "Contention for uploading metrics data. Backing off"; return false; } @@ -572,7 +570,7 @@ bool MetricsService::UploadData() { DCHECK(!pending_log_text.empty()); // Allow security conscious users to see all metrics logs that we send. - LOG(INFO) << "METRICS LOG: " << pending_log_text; + VLOG(1) << "METRICS LOG: " << pending_log_text; bool ret = true; diff --git a/chrome_frame/np_event_listener.cc b/chrome_frame/np_event_listener.cc index f9aa43c..937ca1d 100644 --- a/chrome_frame/np_event_listener.cc +++ b/chrome_frame/np_event_listener.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -116,7 +116,7 @@ bool DomEventListener::GetObjectElement(NPP instance, nsIDOMElement** element) { // in webkit. npapi::GetValue(instance, NPNVDOMElement, elem.Receive()); if (!elem.get()) { - DLOG(INFO) << "Failed to get NPNVDOMElement"; + DVLOG(1) << "Failed to get NPNVDOMElement"; return false; } @@ -177,10 +177,10 @@ NPObject* NPObjectEventListener::GetObjectElement(NPP instance) { object = NPVARIANT_TO_OBJECT(var); } } else { - DLOG(INFO) << __FUNCTION__ << " got " << tag; + DVLOG(1) << __FUNCTION__ << " got " << tag; } } else { - DLOG(INFO) << __FUNCTION__ << " failed to get the element's tag"; + DVLOG(1) << __FUNCTION__ << " failed to get the element's tag"; } } else { DLOG(WARNING) << __FUNCTION__ << " failed to get NPNVPluginElementNPObject"; @@ -285,7 +285,7 @@ void NPObjectEventListener::HandleEvent(Npo* npo, NPObject* event) { // Opera doesn't zero terminate its utf8 strings. const NPString& type = NPVARIANT_TO_STRING(result); std::string zero_terminated(type.UTF8Characters, type.UTF8Length); - DLOG(INFO) << "handleEvent: " << zero_terminated; + DVLOG(1) << "handleEvent: " << zero_terminated; delegate_->OnEvent(zero_terminated.c_str()); } } diff --git a/chrome_frame/npapi_url_request.cc b/chrome_frame/npapi_url_request.cc index ebc4782..ad2416c 100644 --- a/chrome_frame/npapi_url_request.cc +++ b/chrome_frame/npapi_url_request.cc @@ -56,17 +56,17 @@ NPAPIUrlRequest::NPAPIUrlRequest(NPP instance) pending_read_size_(0), status_(URLRequestStatus::FAILED, net::ERR_FAILED), thread_(PlatformThread::CurrentId()) { - DLOG(INFO) << "Created request. Count: " << ++instance_count_; + DVLOG(1) << "Created request. Count: " << ++instance_count_; } NPAPIUrlRequest::~NPAPIUrlRequest() { - DLOG(INFO) << "Deleted request. Count: " << --instance_count_; + DVLOG(1) << "Deleted request. Count: " << --instance_count_; } // NPAPIUrlRequest member defines. bool NPAPIUrlRequest::Start() { NPError result = NPERR_GENERIC_ERROR; - DLOG(INFO) << "Starting URL request: " << url(); + DVLOG(1) << "Starting URL request: " << url(); if (LowerCaseEqualsASCII(method(), "get")) { // TODO(joshia): if we have extra headers for HTTP GET, then implement // it using XHR @@ -119,8 +119,8 @@ bool NPAPIUrlRequest::Start() { } void NPAPIUrlRequest::Stop() { - DLOG(INFO) << "Finished request: Url - " << url() << " result: " - << static_cast<int>(status_.status()); + DVLOG(1) << "Finished request: Url - " << url() + << " result: " << static_cast<int>(status_.status()); status_.set_status(URLRequestStatus::CANCELED); if (stream_) { @@ -270,12 +270,12 @@ void NPAPIUrlRequestManager::SetCookiesForUrl(const GURL& url, npapi::SetValueForURL(instance_, NPNURLVCookie, url.spec().c_str(), cookie.c_str(), cookie.length()); } else { - DLOG(INFO) << "Host does not support NPVERS_HAS_URL_AND_AUTH_INFO."; - DLOG(INFO) << "Attempting to set cookie using XPCOM cookie service"; + DVLOG(1) << "Host does not support NPVERS_HAS_URL_AND_AUTH_INFO. " + "Attempting to set cookie using XPCOM cookie service"; if (np_utils::SetCookiesUsingXPCOMCookieService(instance_, url.spec(), cookie)) { - DLOG(INFO) << "Successfully set cookies using XPCOM cookie service"; - DLOG(INFO) << cookie.c_str(); + DVLOG(1) << "Successfully set cookies using XPCOM cookie service " + << cookie; } else { NOTREACHED() << "Failed to set cookies for host"; } @@ -293,26 +293,26 @@ void NPAPIUrlRequestManager::GetCookiesForUrl(const GURL& url, int cookie_id) { url.spec().c_str(), &cookies, &cookie_length); if (ret == NPERR_NO_ERROR) { - DLOG(INFO) << "Obtained cookies:" << cookies << " from host"; + DVLOG(1) << "Obtained cookies:" << cookies << " from host"; cookie_string.append(cookies, cookie_length); npapi::MemFree(cookies); } else { success = false; } } else { - DLOG(INFO) << "Host does not support NPVERS_HAS_URL_AND_AUTH_INFO."; - DLOG(INFO) << "Attempting to read cookie using XPCOM cookie service"; + DVLOG(1) << "Host does not support NPVERS_HAS_URL_AND_AUTH_INFO. " + "Attempting to read cookie using XPCOM cookie service"; if (np_utils::GetCookiesUsingXPCOMCookieService(instance_, url.spec(), &cookie_string)) { - DLOG(INFO) << "Successfully read cookies using XPCOM cookie service"; - DLOG(INFO) << cookie_string.c_str(); + DVLOG(1) << "Successfully read cookies using XPCOM cookie service " + << cookie_string; } else { success = false; } } if (!success) - DLOG(INFO) << "Failed to return cookies for url:" << url.spec().c_str(); + DVLOG(1) << "Failed to return cookies for url:" << url.spec(); OnCookiesRetrieved(success, url, cookie_string, cookie_id); } diff --git a/chrome_frame/ole_document_impl.h b/chrome_frame/ole_document_impl.h index 9ce1bbe..f18db16 100644 --- a/chrome_frame/ole_document_impl.h +++ b/chrome_frame/ole_document_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -39,46 +39,42 @@ class ATL_NO_VTABLE IOleDocumentImpl : public IOleDocument { IStream* stream, DWORD reserved , IOleDocumentView** new_view) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (new_view == NULL) return E_POINTER; T* t = static_cast<T*>(this); // If we've already created a view then we can't create another as we // currently only support the ability to create one view - if (t->m_spInPlaceSite) { + if (t->m_spInPlaceSite) return E_FAIL; - } IOleDocumentView* view; t->GetUnknown()->QueryInterface(IID_IOleDocumentView, reinterpret_cast<void**>(&view)); // If we support IOleDocument we should support IOleDocumentView ATLENSURE(view != NULL); // If they've given us a site then use it - if (in_place_site != NULL) { + if (in_place_site != NULL) view->SetInPlaceSite(in_place_site); - } // If they have given us an IStream pointer then use it to // initialize the view - if (stream != NULL) { + if (stream != NULL) view->ApplyViewState(stream); - } // Return the view *new_view = view; return S_OK; } STDMETHOD(GetDocMiscStatus)(DWORD* status) { - DLOG(INFO) << __FUNCTION__; - if (NULL == status) { + DVLOG(1) << __FUNCTION__; + if (NULL == status) return E_POINTER; - } *status = DOCMISC_NOFILESUPPORT; return S_OK; } STDMETHOD(EnumViews)(IEnumOleDocumentViews** enum_views, IOleDocumentView** view) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (view == NULL) return E_POINTER; T* t = static_cast<T*>(this); @@ -95,15 +91,14 @@ template <class T> class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { public: STDMETHOD(SetInPlaceSite)(IOleInPlaceSite* in_place_site) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; T* t = static_cast<T*>(this); if (t->m_spInPlaceSite) { // If we already have a site get rid of it UIActivate(FALSE); HRESULT hr = t->InPlaceDeactivate(); - if (FAILED(hr)) { + if (FAILED(hr)) return hr; - } DCHECK(!t->m_bInPlaceActive); } if (in_place_site != NULL) { @@ -129,10 +124,9 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(GetInPlaceSite)(IOleInPlaceSite** in_place_site) { - DLOG(INFO) << __FUNCTION__; - if (in_place_site == NULL) { + DVLOG(1) << __FUNCTION__; + if (in_place_site == NULL) return E_POINTER; - } T* t = static_cast<T*>(this); return t->m_spInPlaceSite->QueryInterface( IID_IOleInPlaceSite, @@ -140,10 +134,9 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(GetDocument)(IUnknown** document) { - DLOG(INFO) << __FUNCTION__; - if (document == NULL) { + DVLOG(1) << __FUNCTION__; + if (document == NULL) return E_POINTER; - } T* t = static_cast<T*>(this); *document = t->GetUnknown(); (*document)->AddRef(); @@ -152,12 +145,12 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { STDMETHOD(SetRect)(LPRECT view_rect) { static bool is_resizing = false; - if (is_resizing) { + if (is_resizing) return S_OK; - } is_resizing = true; - DLOG(INFO) << __FUNCTION__ << " " << view_rect->left << "," << - view_rect->top << "," << view_rect->right << "," << view_rect->bottom; + DVLOG(1) << __FUNCTION__ << " " << view_rect->left << "," + << view_rect->top << "," << view_rect->right << "," + << view_rect->bottom; T* t = static_cast<T*>(this); t->SetObjectRects(view_rect, view_rect); is_resizing = false; @@ -165,10 +158,9 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(GetRect)(LPRECT view_rect) { - DLOG(INFO) << __FUNCTION__; - if (view_rect == NULL) { + DVLOG(1) << __FUNCTION__; + if (view_rect == NULL) return E_POINTER; - } T* t = static_cast<T*>(this); *view_rect = t->m_rcPos; return S_OK; @@ -178,12 +170,12 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { LPRECT hscroll_rect, LPRECT vscroll_rect, LPRECT size_box_rect) { - DLOG(INFO) << __FUNCTION__ << " not implemented"; + DVLOG(1) << __FUNCTION__ << " not implemented"; return E_NOTIMPL; } STDMETHOD(Show)(BOOL show) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; T* t = static_cast<T*>(this); HRESULT hr = S_OK; if (show) { @@ -197,17 +189,15 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(UIActivate)(BOOL ui_activate) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; T* t = static_cast<T*>(this); HRESULT hr = S_OK; if (ui_activate) { // We must know the client site first - if (t->m_spInPlaceSite == NULL) { + if (t->m_spInPlaceSite == NULL) return E_UNEXPECTED; - } - if (!t->m_bUIActive) { + if (!t->m_bUIActive) hr = t->ActiveXDocActivate(OLEIVERB_UIACTIVATE); - } } else { // Menu integration is still not complete, so do not destroy // IE's menus. If we call InPlaceMenuDestroy here, menu items such @@ -221,12 +211,12 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(Open)() { - DLOG(INFO) << __FUNCTION__ << " not implemented"; + DVLOG(1) << __FUNCTION__ << " not implemented"; return E_NOTIMPL; } STDMETHOD(CloseView)(DWORD reserved) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; T* t = static_cast<T*>(this); t->Show(FALSE); t->SetInPlaceSite(NULL); @@ -234,18 +224,18 @@ class ATL_NO_VTABLE IOleDocumentViewImpl : public IOleDocumentView { } STDMETHOD(SaveViewState)(LPSTREAM stream) { - DLOG(INFO) << __FUNCTION__ << " not implemented"; + DVLOG(1) << __FUNCTION__ << " not implemented"; return E_NOTIMPL; } STDMETHOD(ApplyViewState)(LPSTREAM stream) { - DLOG(INFO) << __FUNCTION__ << " not implemented"; + DVLOG(1) << __FUNCTION__ << " not implemented"; return E_NOTIMPL; } STDMETHOD(Clone)(IOleInPlaceSite* new_in_place_site, IOleDocumentView** new_view) { - DLOG(INFO) << __FUNCTION__ << " not implemented"; + DVLOG(1) << __FUNCTION__ << " not implemented"; return E_NOTIMPL; } diff --git a/chrome_frame/policy_settings.cc b/chrome_frame/policy_settings.cc index d00e69a..834d6cc 100644 --- a/chrome_frame/policy_settings.cc +++ b/chrome_frame/policy_settings.cc @@ -65,7 +65,7 @@ void PolicySettings::RefreshFromRegistry() { "invalid default renderer setting: " << value; if (value != RENDER_IN_HOST && value != RENDER_IN_CHROME_FRAME) { - DLOG(INFO) << "default renderer not specified via policy"; + DVLOG(1) << "default renderer not specified via policy"; } else { default_renderer_ = static_cast<RendererForUrl>(value); const char* exclusion_list_name = (default_renderer_ == RENDER_IN_HOST) ? @@ -75,9 +75,9 @@ void PolicySettings::RefreshFromRegistry() { EnumerateKeyValues(config_key.Handle(), ASCIIToWide(exclusion_list_name).c_str(), &renderer_exclusion_list_); - DLOG(INFO) << "Default renderer as specified via policy: " << - default_renderer_ << " exclusion list size: " << - renderer_exclusion_list_.size(); + DVLOG(1) << "Default renderer as specified via policy: " + << default_renderer_ + << " exclusion list size: " << renderer_exclusion_list_.size(); } std::wstring sub_key(policy::kRegistrySubKey); diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc index 4b19bc0..5d9d42f 100644 --- a/chrome_frame/protocol_sink_wrap.cc +++ b/chrome_frame/protocol_sink_wrap.cc @@ -86,11 +86,11 @@ ProtData::ProtocolDataMap ProtData::datamap_; Lock ProtData::datamap_lock_; ProtocolSinkWrap::ProtocolSinkWrap() { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf(" 0x%08X", this); + DVLOG(1) << __FUNCTION__ << base::StringPrintf(" 0x%08X", this); } ProtocolSinkWrap::~ProtocolSinkWrap() { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf(" 0x%08X", this); + DVLOG(1) << __FUNCTION__ << base::StringPrintf(" 0x%08X", this); } ScopedComPtr<IInternetProtocolSink> ProtocolSinkWrap::CreateNewSink( @@ -156,9 +156,9 @@ STDMETHODIMP ProtocolSinkWrap::Switch(PROTOCOLDATA* protocol_data) { STDMETHODIMP ProtocolSinkWrap::ReportProgress(ULONG status_code, LPCWSTR status_text) { - DLOG(INFO) << "ProtocolSinkWrap::ReportProgress: " - << BindStatus2Str(status_code) - << " Status: " << (status_text ? status_text : L""); + DVLOG(1) << "ProtocolSinkWrap::ReportProgress: " + << BindStatus2Str(status_code) + << " Status: " << (status_text ? status_text : L""); HRESULT hr = prot_data_->ReportProgress(delegate_, status_code, status_text); return hr; @@ -167,8 +167,8 @@ STDMETHODIMP ProtocolSinkWrap::ReportProgress(ULONG status_code, STDMETHODIMP ProtocolSinkWrap::ReportData(DWORD flags, ULONG progress, ULONG max_progress) { DCHECK(delegate_); - DLOG(INFO) << "ProtocolSinkWrap::ReportData: " << Bscf2Str(flags) << - " progress: " << progress << " progress_max: " << max_progress; + DVLOG(1) << "ProtocolSinkWrap::ReportData: " << Bscf2Str(flags) + << " progress: " << progress << " progress_max: " << max_progress; HRESULT hr = prot_data_->ReportData(delegate_, flags, progress, max_progress); return hr; @@ -176,8 +176,9 @@ STDMETHODIMP ProtocolSinkWrap::ReportData(DWORD flags, ULONG progress, STDMETHODIMP ProtocolSinkWrap::ReportResult(HRESULT result, DWORD error, LPCWSTR result_text) { - DLOG(INFO) << "ProtocolSinkWrap::ReportResult: result: " << result << - " error: " << error << " Text: " << (result_text ? result_text : L""); + DVLOG(1) << "ProtocolSinkWrap::ReportResult: result: " << result + << " error: " << error + << " Text: " << (result_text ? result_text : L""); ExceptionBarrier barrier; HRESULT hr = prot_data_->ReportResult(delegate_, result, error, result_text); return hr; @@ -360,7 +361,7 @@ ProtData::ProtData(IInternetProtocol* protocol, renderer_type_(RENDERER_TYPE_UNDETERMINED), protocol_(protocol), read_fun_(read_fun), url_(url) { memset(buffer_, 0, arraysize(buffer_)); - DLOG(INFO) << __FUNCTION__ << " " << this; + DVLOG(1) << __FUNCTION__ << " " << this; // Add to map. AutoLock lock(datamap_lock_); @@ -369,7 +370,7 @@ ProtData::ProtData(IInternetProtocol* protocol, } ProtData::~ProtData() { - DLOG(INFO) << __FUNCTION__ << " " << this; + DVLOG(1) << __FUNCTION__ << " " << this; Invalidate(); } @@ -459,8 +460,8 @@ HRESULT ProtData::ReportProgress(IInternetProtocolSink* delegate, if (IsChrome(renderer_type_)) { // Suggested mime type is "text/html" and we have DEFAULT_RENDERER, // OPT_IN_URL, or RESPONSE_HEADER. - DLOG(INFO) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " - << kChromeMimeType; + DVLOG(1) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " + << kChromeMimeType; SaveReferrer(delegate); delegate->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, kChromeMimeType); } else if (renderer_type_ == RENDERER_TYPE_OTHER) { @@ -503,8 +504,7 @@ HRESULT ProtData::ReportData(IInternetProtocolSink* delegate, } if (IsChrome(renderer_type_)) { - DLOG(INFO) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " - << kChromeMimeType; + DVLOG(1) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " << kChromeMimeType; SaveReferrer(delegate); delegate->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, kChromeMimeType); } @@ -529,7 +529,7 @@ HRESULT ProtData::ReportResult(IInternetProtocolSink* delegate, HRESULT result, // We may receive ReportResult without ReportData, if the connection fails // for example. if (renderer_type_ == RENDERER_TYPE_UNDETERMINED) { - DLOG(INFO) << "ReportResult received but renderer type is yet unknown."; + DVLOG(1) << "ReportResult received but renderer type is yet unknown."; renderer_type_ = RENDERER_TYPE_OTHER; FireSuggestedMimeType(delegate); } @@ -569,15 +569,15 @@ void ProtData::SaveSuggestedMimeType(LPCWSTR status_text) { void ProtData::FireSuggestedMimeType(IInternetProtocolSink* delegate) { if (has_server_mime_type_) { - DLOG(INFO) << "Forwarding BINDSTATUS_SERVER_MIMETYPEAVAILABLE " - << suggested_mime_type_; + DVLOG(1) << "Forwarding BINDSTATUS_SERVER_MIMETYPEAVAILABLE " + << suggested_mime_type_; delegate->ReportProgress(BINDSTATUS_SERVER_MIMETYPEAVAILABLE, suggested_mime_type_); } if (has_suggested_mime_type_) { - DLOG(INFO) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " - << suggested_mime_type_; + DVLOG(1) << "Forwarding BINDSTATUS_MIMETYPEAVAILABLE " + << suggested_mime_type_; delegate->ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE, suggested_mime_type_); } @@ -681,7 +681,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start, if (!bind_ctx) { // MSHTML sometimes takes a short path, skips the creation of // moniker and binding, by directly grabbing protocol from InternetSession - DLOG(INFO) << "DirectBind for " << url; + DVLOG(1) << "DirectBind for " << url; return ForwardHookStart(orig_start, protocol, url, prot_sink, bind_info, flags, reserved); } @@ -702,7 +702,7 @@ STDMETHODIMP Hook_Start(InternetProtocol_Start_Fn orig_start, } if (prot_data) { - DLOG(INFO) << "Found existing ProtData!"; + DVLOG(1) << "Found existing ProtData!"; prot_data->UpdateUrl(url); ScopedComPtr<IInternetProtocolSink> new_sink = ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data); @@ -756,7 +756,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex, if (!bind_ctx) { // MSHTML sometimes takes a short path, skips the creation of // moniker and binding, by directly grabbing protocol from InternetSession. - DLOG(INFO) << "DirectBind for " << url; + DVLOG(1) << "DirectBind for " << url; return ForwardHookStartEx(orig_start_ex, protocol, uri, prot_sink, bind_info, flags, reserved); } @@ -777,7 +777,7 @@ STDMETHODIMP Hook_StartEx(InternetProtocol_StartEx_Fn orig_start_ex, } if (prot_data) { - DLOG(INFO) << "Found existing ProtData!"; + DVLOG(1) << "Found existing ProtData!"; prot_data->UpdateUrl(url); ScopedComPtr<IInternetProtocolSink> new_sink = ProtocolSinkWrap::CreateNewSink(prot_sink, prot_data); diff --git a/chrome_frame/task_marshaller.cc b/chrome_frame/task_marshaller.cc index b8a504a5..ab5059e 100644 --- a/chrome_frame/task_marshaller.cc +++ b/chrome_frame/task_marshaller.cc @@ -1,6 +1,7 @@ // Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #include "chrome_frame/task_marshaller.h" #include "base/task.h" @@ -27,13 +28,14 @@ void TaskMarshallerThroughMessageQueue::PostTask( return; if (!::PostMessage(wnd_, msg_, 0, 0)) { - DLOG(INFO) << "Dropping MSG_EXECUTE_TASK message for destroyed window."; + DVLOG(1) << "Dropping MSG_EXECUTE_TASK message for destroyed window."; DeleteAll(); } } void TaskMarshallerThroughMessageQueue::PostDelayedTask( - const tracked_objects::Location& source, Task* task, + const tracked_objects::Location& source, + Task* task, base::TimeDelta& delay) { DCHECK(wnd_ != NULL); AutoLock lock(lock_); @@ -47,8 +49,11 @@ void TaskMarshallerThroughMessageQueue::PostDelayedTask( } BOOL TaskMarshallerThroughMessageQueue::ProcessWindowMessage(HWND hWnd, - UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, - DWORD dwMsgMapID) { + UINT uMsg, + WPARAM wParam, + LPARAM lParam, + LRESULT& lResult, + DWORD dwMsgMapID) { if (hWnd == wnd_ && uMsg == msg_) { ExecuteQueuedTasks(); lResult = 0; diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index 99fedd2..7d6a28b 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -554,8 +554,8 @@ bool DetectRunningCrashService(int timeout_ms) { base::ProcessHandle StartCrashService() { if (DetectRunningCrashService(kCrashServiceStartupTimeoutMs)) { - DLOG(INFO) << "crash_service.exe is already running. We will use the " - << "existing process and leave it running after tests complete."; + DVLOG(1) << "crash_service.exe is already running. We will use the " + "existing process and leave it running after tests complete."; return NULL; } @@ -567,7 +567,7 @@ base::ProcessHandle StartCrashService() { base::ProcessHandle crash_service = NULL; - DLOG(INFO) << "Starting crash_service.exe so you know if a test crashes!"; + DVLOG(1) << "Starting crash_service.exe so you know if a test crashes!"; FilePath crash_service_path = exe_dir.AppendASCII("crash_service.exe"); if (!base::LaunchApp(crash_service_path.value(), false, false, @@ -579,13 +579,13 @@ base::ProcessHandle StartCrashService() { base::Time start = base::Time::Now(); if (DetectRunningCrashService(kCrashServiceStartupTimeoutMs)) { - DLOG(INFO) << "crash_service.exe is ready for clients in " - << (base::Time::Now() - start).InMilliseconds() << "ms."; + DVLOG(1) << "crash_service.exe is ready for clients in " + << (base::Time::Now() - start).InMilliseconds() << " ms."; return crash_service; } else { DLOG(ERROR) << "crash_service.exe failed to accept client connections " - << "within " << kCrashServiceStartupTimeoutMs << "ms. " - << "Terminating it now."; + "within " << kCrashServiceStartupTimeoutMs << " ms. " + "Terminating it now."; // First check to see if it's even still running just to minimize the // likelihood of spurious error messages from KillProcess. diff --git a/chrome_frame/test/chrome_frame_ui_test_utils.cc b/chrome_frame/test/chrome_frame_ui_test_utils.cc index 8de7d8e..09bbfbd 100644 --- a/chrome_frame/test/chrome_frame_ui_test_utils.cc +++ b/chrome_frame/test/chrome_frame_ui_test_utils.cc @@ -536,7 +536,7 @@ bool AccObjectMatcher::FindInWindow(HWND hwnd, scoped_refptr<AccObject>* match) const { scoped_refptr<AccObject> object(AccObject::CreateFromWindow(hwnd)); if (!object) { - LOG(INFO) << "Failed to get accessible object from window"; + VLOG(1) << "Failed to get accessible object from window"; return false; } return Find(object.get(), match); diff --git a/chrome_frame/test/http_negotiate_unittest.cc b/chrome_frame/test/http_negotiate_unittest.cc index 0ef8a43..e34e963 100644 --- a/chrome_frame/test/http_negotiate_unittest.cc +++ b/chrome_frame/test/http_negotiate_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -186,7 +186,7 @@ END_COM_MAP() TEST_F(HttpNegotiateTest, ReportProgress) { if (chrome_frame_test::GetInstalledIEVersion() == IE_6) { - DLOG(INFO) << "Not running test for IE6"; + DVLOG(1) << "Not running test for IE6"; return; } static const int kReportProgressIndex = 4; diff --git a/chrome_frame/test/ie_event_sink.cc b/chrome_frame/test/ie_event_sink.cc index 85bebb88..50d33b5 100644 --- a/chrome_frame/test/ie_event_sink.cc +++ b/chrome_frame/test/ie_event_sink.cc @@ -421,7 +421,7 @@ STDMETHODIMP_(void) IEEventSink::OnNewWindow2(IDispatch** disp, STDMETHODIMP_(void) IEEventSink::OnNavigateError(IDispatch* dispatch, VARIANT* url, VARIANT* frame_name, VARIANT* status_code, VARIANT* cancel) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (listener_) listener_->OnNavigateError(dispatch, url, frame_name, status_code, cancel); } @@ -430,8 +430,8 @@ STDMETHODIMP IEEventSink::OnBeforeNavigate2( IDispatch* dispatch, VARIANT* url, VARIANT* flags, VARIANT* target_frame_name, VARIANT* post_data, VARIANT* headers, VARIANT_BOOL* cancel) { - DLOG(INFO) << __FUNCTION__ - << base::StringPrintf("%ls - 0x%08X", url->bstrVal, this); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf("%ls - 0x%08X", url->bstrVal, this); // Reset any existing reference to chrome frame since this is a new // navigation. DisconnectFromChromeFrame(); @@ -443,7 +443,7 @@ STDMETHODIMP IEEventSink::OnBeforeNavigate2( STDMETHODIMP_(void) IEEventSink::OnNavigateComplete2( IDispatch* dispatch, VARIANT* url) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; ConnectToChromeFrame(); if (listener_) listener_->OnNavigateComplete2(dispatch, url); @@ -451,7 +451,7 @@ STDMETHODIMP_(void) IEEventSink::OnNavigateComplete2( STDMETHODIMP_(void) IEEventSink::OnDocumentComplete( IDispatch* dispatch, VARIANT* url) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; EXPECT_TRUE(url); if (!url) return; @@ -461,8 +461,8 @@ STDMETHODIMP_(void) IEEventSink::OnDocumentComplete( STDMETHODIMP_(void) IEEventSink::OnFileDownload( VARIANT_BOOL active_doc, VARIANT_BOOL* cancel) { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf(" 0x%08X ad=%i", this, - active_doc); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf(" 0x%08X ad=%i", this, active_doc); if (listener_) { listener_->OnFileDownload(active_doc, cancel); } else { @@ -473,7 +473,7 @@ STDMETHODIMP_(void) IEEventSink::OnFileDownload( STDMETHODIMP_(void) IEEventSink::OnNewWindow3( IDispatch** dispatch, VARIANT_BOOL* cancel, DWORD flags, BSTR url_context, BSTR url) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; EXPECT_TRUE(dispatch); if (!dispatch) return; @@ -498,7 +498,7 @@ STDMETHODIMP_(void) IEEventSink::OnNewWindow3( } STDMETHODIMP_(void) IEEventSink::OnQuit() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; did_receive_on_quit_ = true; @@ -510,7 +510,7 @@ STDMETHODIMP_(void) IEEventSink::OnQuit() { } HRESULT IEEventSink::OnLoad(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; ScopedVariant stack_object(*param); if (chrome_frame_) { if (listener_) @@ -522,7 +522,7 @@ HRESULT IEEventSink::OnLoad(const VARIANT* param) { } HRESULT IEEventSink::OnLoadError(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; if (chrome_frame_) { if (listener_) listener_->OnLoadError(param->bstrVal); @@ -533,7 +533,7 @@ HRESULT IEEventSink::OnLoadError(const VARIANT* param) { } HRESULT IEEventSink::OnMessage(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__ << " " << param; + DVLOG(1) << __FUNCTION__ << " " << param; if (!chrome_frame_.get()) { DLOG(WARNING) << "Invalid chrome frame pointer"; return S_OK; diff --git a/chrome_frame/test/ie_event_sink.h b/chrome_frame/test/ie_event_sink.h index fd21317..d65e026 100644 --- a/chrome_frame/test/ie_event_sink.h +++ b/chrome_frame/test/ie_event_sink.h @@ -214,10 +214,14 @@ END_SINK_MAP() STDMETHOD_(void, OnQuit)(); #ifdef _DEBUG - STDMETHOD(Invoke)(DISPID dispid, REFIID riid, - LCID lcid, WORD flags, DISPPARAMS* params, VARIANT* result, - EXCEPINFO* except_info, UINT* arg_error) { - DLOG(INFO) << __FUNCTION__ << L" disp id :" << dispid; + STDMETHOD(Invoke)(DISPID dispid, + REFIID riid, LCID lcid, + WORD flags, + DISPPARAMS* params, + VARIANT* result, + EXCEPINFO* except_info, + UINT* arg_error) { + DVLOG(1) << __FUNCTION__ << L" disp id :" << dispid; return DispEventsImpl::Invoke(dispid, riid, lcid, flags, params, result, except_info, arg_error); } diff --git a/chrome_frame/test/mock_ie_event_sink_test.cc b/chrome_frame/test/mock_ie_event_sink_test.cc index cb77efa..98119ed 100644 --- a/chrome_frame/test/mock_ie_event_sink_test.cc +++ b/chrome_frame/test/mock_ie_event_sink_test.cc @@ -32,7 +32,7 @@ void MockIEEventSink::OnDocumentComplete(IDispatch* dispatch, VARIANT* url) { renderer_window, OBJID_CLIENT, 0L); } else { - DLOG(INFO) << "Browser does not have renderer window"; + DVLOG(1) << "Browser does not have renderer window"; } OnLoad(IN_IE, V_BSTR(url)); } @@ -62,8 +62,8 @@ ExpectationSet MockIEEventSink::ExpectNavigationCardinality( // InSequence. DLOG_IF(WARNING, complete_cardinality.ConservativeUpperBound() > 1000) << "Cardinality upper bound may be too great to be split up into single " - << "expect statements. If you do not require this navigation to be in " - << "sequence, do not call this method."; + "expect statements. If you do not require this navigation to be in " + "sequence, do not call this method."; int call_count = 0; InSequence expect_in_sequence_for_scope; while (!complete_cardinality.IsSaturatedByCallCount(call_count)) { diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index db89bc2..322bf87 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -60,7 +60,7 @@ bool TestAutomationProvider::Send(IPC::Message* msg) { DCHECK(tab_handle_ == -1) << "Currently only support one tab"; void* iter = NULL; CHECK(msg->ReadInt(&iter, &tab_handle_)); - DLOG(INFO) << "Got tab handle: " << tab_handle_; + DVLOG(1) << "Got tab handle: " << tab_handle_; DCHECK(tab_handle_ != -1 && tab_handle_ != 0); delegate_->OnInitialTabLoaded(); } diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc index 34c1183..08dbdf2 100644 --- a/chrome_frame/test/perf/chrome_frame_perftest.cc +++ b/chrome_frame/test/perf/chrome_frame_perftest.cc @@ -72,19 +72,19 @@ class ChromeFrameActiveXContainer END_MSG_MAP() HRESULT OnMessageCallback(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; OnMessageCallbackImpl(param); return S_OK; } HRESULT OnLoadErrorCallback(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; OnLoadErrorCallbackImpl(param); return S_OK; } HRESULT OnLoadCallback(const VARIANT* param) { - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; OnLoadCallbackImpl(param); return S_OK; } @@ -464,7 +464,7 @@ class ChromeFrameStartupTestActiveXReference chrome_frame_dll_ = FilePath( chrome_frame_registrar_->GetReferenceChromeFrameDllPath()); - DLOG(INFO) << __FUNCTION__ << ": " << chrome_frame_dll_.value(); + DVLOG(1) << __FUNCTION__ << ": " << chrome_frame_dll_.value(); } virtual void TearDown() { @@ -593,7 +593,7 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { ASSERT_TRUE(param != NULL); ASSERT_EQ(VT_BSTR, param->vt); - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; InitiateNextNavigation(); } @@ -601,7 +601,7 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { ASSERT_TRUE(param != NULL); ASSERT_EQ(VT_BSTR, param->vt); - DLOG(INFO) << __FUNCTION__ << " " << param->bstrVal; + DVLOG(1) << __FUNCTION__ << " " << param->bstrVal; InitiateNextNavigation(); } diff --git a/chrome_frame/test/test_server.cc b/chrome_frame/test/test_server.cc index 4493300..98792e2 100644 --- a/chrome_frame/test/test_server.cc +++ b/chrome_frame/test/test_server.cc @@ -314,8 +314,8 @@ void ConfigurableConnection::SendChunk() { int bytes_to_send = std::min(options_.chunk_size_, size - cur_pos_); socket_->Send(chunk_ptr, bytes_to_send); - DLOG(INFO) << "Sent(" << cur_pos_ << "," << bytes_to_send - << "): " << base::StringPiece(chunk_ptr, bytes_to_send); + DVLOG(1) << "Sent(" << cur_pos_ << "," << bytes_to_send << "): " + << base::StringPiece(chunk_ptr, bytes_to_send); cur_pos_ += bytes_to_send; if (cur_pos_ < size) { @@ -356,7 +356,7 @@ void ConfigurableConnection::SendWithOptions(const std::string& headers, if (options_.speed_ == SendOptions::IMMEDIATE_HEADERS_DELAYED_CONTENT) { socket_->Send(headers); socket_->Send(content_length_header, true); - DLOG(INFO) << "Headers sent: " << headers << content_length_header; + DVLOG(1) << "Headers sent: " << headers << content_length_header; data_.append(content); } diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 29b3831..1174cab 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -355,8 +355,8 @@ void MockWebServer::SendResponseHelper( headers); } else { EXPECT_TRUE(net::GetMimeTypeFromFile(file_path, &content_type)); - DLOG(INFO) << "Going to send file (" << WideToUTF8(file_path.value()) - << ") with content type (" << content_type << ")"; + DVLOG(1) << "Going to send file (" << WideToUTF8(file_path.value()) + << ") with content type (" << content_type << ")"; headers = CreateHttpHeaders(invocation, add_no_cache_header, content_type); } @@ -371,8 +371,8 @@ void MockWebServer::SendResponseHelper( << "meta tag to HTML file."; } } else { - DLOG(INFO) << "Going to send 404 for non-existent file (" - << WideToUTF8(file_path.value()) << ")"; + DVLOG(1) << "Going to send 404 for non-existent file (" + << WideToUTF8(file_path.value()) << ")"; headers = "HTTP/1.1 404 Not Found"; body = ""; } diff --git a/chrome_frame/urlmon_bind_status_callback.cc b/chrome_frame/urlmon_bind_status_callback.cc index bfc41f9..3d03542 100644 --- a/chrome_frame/urlmon_bind_status_callback.cc +++ b/chrome_frame/urlmon_bind_status_callback.cc @@ -196,9 +196,8 @@ void SniffData::DetermineRendererType(bool last_chance) { } } } - DLOG(INFO) << __FUNCTION__ << "Url: " << url_ << - base::StringPrintf("Renderer type: %s", - renderer_type_ == CHROME ? "CHROME" : "OTHER"); + DVLOG(1) << __FUNCTION__ << "Url: " << url_ << base::StringPrintf( + "Renderer type: %s", renderer_type_ == CHROME ? "CHROME" : "OTHER"); } } @@ -213,8 +212,8 @@ BSCBStorageBind::~BSCBStorageBind() { } HRESULT BSCBStorageBind::Initialize(IMoniker* moniker, IBindCtx* bind_ctx) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); std::wstring url = GetActualUrlFromMoniker(moniker, bind_ctx, std::wstring()); @@ -238,9 +237,9 @@ HRESULT BSCBStorageBind::Initialize(IMoniker* moniker, IBindCtx* bind_ctx) { STDMETHODIMP BSCBStorageBind::OnProgress(ULONG progress, ULONG progress_max, ULONG status_code, LPCWSTR status_text) { - DLOG(INFO) << __FUNCTION__ << me() << base::StringPrintf( - " status=%i tid=%i %ls", status_code, PlatformThread::CurrentId(), - status_text); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(" status=%i tid=%i %ls", status_code, + PlatformThread::CurrentId(), status_text); // Report all crashes in the exception handler if we wrap the callback. // Note that this avoids having the VEH report a crash if an SEH earlier in // the chain handles the exception. @@ -273,8 +272,8 @@ STDMETHODIMP BSCBStorageBind::OnProgress(ULONG progress, ULONG progress_max, STDMETHODIMP BSCBStorageBind::OnDataAvailable(DWORD flags, DWORD size, FORMATETC* format_etc, STGMEDIUM* stgmed) { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); // Report all crashes in the exception handler if we wrap the callback. // Note that this avoids having the VEH report a crash if an SEH earlier in // the chain handles the exception. @@ -316,8 +315,8 @@ STDMETHODIMP BSCBStorageBind::OnDataAvailable(DWORD flags, DWORD size, } STDMETHODIMP BSCBStorageBind::OnStopBinding(HRESULT hresult, LPCWSTR error) { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf(" tid=%i", - PlatformThread::CurrentId()); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf(" tid=%i", PlatformThread::CurrentId()); // Report all crashes in the exception handler if we wrap the callback. // Note that this avoids having the VEH report a crash if an SEH earlier in // the chain handles the exception. diff --git a/chrome_frame/urlmon_moniker.cc b/chrome_frame/urlmon_moniker.cc index f13acb5..daf1f0e 100644 --- a/chrome_frame/urlmon_moniker.cc +++ b/chrome_frame/urlmon_moniker.cc @@ -33,7 +33,7 @@ END_VTABLE_PATCHES() HRESULT NavigationManager::NavigateToCurrentUrlInCF(IBrowserService* browser) { DCHECK(browser); - DLOG(INFO) << __FUNCTION__ << " " << url(); + DVLOG(1) << __FUNCTION__ << " " << url(); MarkBrowserOnThreadForCFNavigation(browser); @@ -64,7 +64,7 @@ HRESULT NavigationManager::NavigateToCurrentUrlInCF(IBrowserService* browser) { hr = NavigateBrowserToMoniker(browser, moniker, headers.c_str(), bind_context, fragment.c_str()); - DLOG(INFO) << base::StringPrintf("NavigateBrowserToMoniker: 0x%08X", hr); + DVLOG(1) << base::StringPrintf("NavigateBrowserToMoniker: 0x%08X", hr); } } @@ -122,14 +122,14 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) { CComHeapPtr<WCHAR> url; HRESULT hr = moniker->GetDisplayName(bind_context, NULL, &url); if (!url) { - DLOG(INFO) << __FUNCTION__ << base::StringPrintf( - " GetDisplayName failed. Error: 0x%x", hr); + DVLOG(1) << __FUNCTION__ + << base::StringPrintf(" GetDisplayName failed. Error: 0x%x", hr); return false; } if (!IsEqualIID(IID_IStream, iid)) { - DLOG(INFO) << __FUNCTION__ << " Url: " << url << - " Not wrapping: IID is not IStream."; + DVLOG(1) << __FUNCTION__ << " Url: " << url + << " Not wrapping: IID is not IStream."; return false; } @@ -137,15 +137,15 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) { BindContextInfo::FromBindContext(bind_context, info.Receive()); DCHECK(info); if (info && info->chrome_request()) { - DLOG(INFO) << __FUNCTION__ << " Url: " << url << - " Not wrapping: request from chrome frame."; + DVLOG(1) << __FUNCTION__ << " Url: " << url + << " Not wrapping: request from chrome frame."; return false; } NavigationManager* mgr = NavigationManager::GetThreadInstance(); if (!mgr) { - DLOG(INFO) << __FUNCTION__ << " Url: " << url << - " No navigation manager to wrap"; + DVLOG(1) << __FUNCTION__ << " Url: " << url + << " No navigation manager to wrap"; return false; } @@ -183,8 +183,8 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) { // incorrect results. bool should_wrap = mgr->IsTopLevelUrl(url); if (!should_wrap) { - DLOG(INFO) << __FUNCTION__ << " Url: " << url << - " Not wrapping: Not top level url."; + DVLOG(1) << __FUNCTION__ << " Url: " << url + << " Not wrapping: Not top level url."; } return should_wrap; } @@ -193,7 +193,7 @@ bool ShouldWrapCallback(IMoniker* moniker, REFIID iid, IBindCtx* bind_context) { HRESULT MonikerPatch::BindToObject(IMoniker_BindToObject_Fn original, IMoniker* me, IBindCtx* bind_ctx, IMoniker* to_left, REFIID iid, void** obj) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(to_left == NULL); ExceptionBarrierReportOnlyModule barrier; diff --git a/chrome_frame/urlmon_moniker.h b/chrome_frame/urlmon_moniker.h index 9c456b4..a5b7fdf 100644 --- a/chrome_frame/urlmon_moniker.h +++ b/chrome_frame/urlmon_moniker.h @@ -101,7 +101,7 @@ class NavigationManager { // Called to set the current top level URL that's being navigated to. void set_url(const wchar_t* url) { - DLOG(INFO) << __FUNCTION__ << " " << url; + DVLOG(1) << __FUNCTION__ << " " << url; url_ = url; } diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index c0eb0c6..105e3bd 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -33,11 +33,11 @@ UrlmonUrlRequest::UrlmonUrlRequest() pending_(false), is_expecting_download_(true), cleanup_transaction_(false) { - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); } UrlmonUrlRequest::~UrlmonUrlRequest() { - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); } std::string UrlmonUrlRequest::me() const { @@ -45,7 +45,7 @@ std::string UrlmonUrlRequest::me() const { } bool UrlmonUrlRequest::Start() { - DLOG(INFO) << __FUNCTION__ << me() << url(); + DVLOG(1) << __FUNCTION__ << me() << url(); DCHECK(thread_ == 0 || thread_ == PlatformThread::CurrentId()); thread_ = PlatformThread::CurrentId(); status_.Start(); @@ -94,7 +94,7 @@ bool UrlmonUrlRequest::Read(int bytes_to_read) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); DCHECK_GE(bytes_to_read, 0); DCHECK_EQ(0, calling_delegate_); - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); is_expecting_download_ = false; @@ -110,15 +110,15 @@ bool UrlmonUrlRequest::Read(int bytes_to_read) { // Send data if available. size_t bytes_copied = 0; if ((bytes_copied = SendDataToDelegate(bytes_to_read))) { - DLOG(INFO) << __FUNCTION__ << me() << " bytes read: " << bytes_copied; + DVLOG(1) << __FUNCTION__ << me() << " bytes read: " << bytes_copied; return true; } if (status_.get_state() == Status::WORKING) { - DLOG(INFO) << __FUNCTION__ << me() << " pending: " << bytes_to_read; + DVLOG(1) << __FUNCTION__ << me() << " pending: " << bytes_to_read; pending_read_size_ = bytes_to_read; } else { - DLOG(INFO) << __FUNCTION__ << me() << " Response finished."; + DVLOG(1) << __FUNCTION__ << me() << " Response finished."; NotifyDelegateAndDie(); } @@ -131,7 +131,7 @@ HRESULT UrlmonUrlRequest::InitPending(const GURL& url, IMoniker* moniker, bool privileged_mode, HWND notification_window, IStream* cache) { - DLOG(INFO) << __FUNCTION__ << me() << url.spec(); + DVLOG(1) << __FUNCTION__ << me() << url.spec(); DCHECK(bind_context_ == NULL); DCHECK(moniker_ == NULL); DCHECK(cache_ == NULL); @@ -156,7 +156,7 @@ HRESULT UrlmonUrlRequest::InitPending(const GURL& url, IMoniker* moniker, void UrlmonUrlRequest::TerminateBind(TerminateBindCallback* callback) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); cleanup_transaction_ = false; if (status_.get_state() == Status::DONE) { // Binding is stopped. Note result could be an error. @@ -198,7 +198,7 @@ size_t UrlmonUrlRequest::SendDataToDelegate(size_t bytes_to_read) { if (cache_) { HRESULT hr = ReadStream(cache_, bytes_to_read, &read_data); if (hr == S_FALSE || read_data.length() < bytes_to_read) { - DLOG(INFO) << __FUNCTION__ << me() << "all cached data read"; + DVLOG(1) << __FUNCTION__ << me() << "all cached data read"; cache_.Release(); } } @@ -274,7 +274,7 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress, return S_OK; if (!delegate_) { - DLOG(INFO) << "Invalid delegate"; + DVLOG(1) << "Invalid delegate"; return S_OK; } @@ -288,8 +288,8 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress, DCHECK(info); GURL previously_redirected(info ? info->url() : std::wstring()); if (GURL(status_text) != previously_redirected) { - DLOG(INFO) << __FUNCTION__ << me() << "redirect from " << url() - << " to " << status_text; + DVLOG(1) << __FUNCTION__ << me() << "redirect from " << url() + << " to " << status_text; // Fetch the redirect status as they aren't all equal (307 in particular // retains the HTTP request verb). int http_code = GetHttpResponseStatusFromBinding(binding_); @@ -330,9 +330,9 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress, break; default: - DLOG(INFO) << __FUNCTION__ << me() - << base::StringPrintf(L"code: %i status: %ls", status_code, - status_text); + DVLOG(1) << __FUNCTION__ << me() + << base::StringPrintf(L"code: %i status: %ls", status_code, + status_text); break; } @@ -341,8 +341,8 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress, STDMETHODIMP UrlmonUrlRequest::OnStopBinding(HRESULT result, LPCWSTR error) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DLOG(INFO) << __FUNCTION__ << me() << - "- Request stopped, Result: " << std::hex << result; + DVLOG(1) << __FUNCTION__ << me() + << "- Request stopped, Result: " << std::hex << result; DCHECK(status_.get_state() == Status::WORKING || status_.get_state() == Status::ABORTING); @@ -467,11 +467,11 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags, if (get_upload_data(&bind_info->stgmedData.pstm) == S_OK) { bind_info->stgmedData.tymed = TYMED_ISTREAM; - DLOG(INFO) << __FUNCTION__ << me() << method() - << " request with " << base::Int64ToString(post_data_len()) - << " bytes. url=" << url(); + DVLOG(1) << __FUNCTION__ << me() << method() + << " request with " << base::Int64ToString(post_data_len()) + << " bytes. url=" << url(); } else { - DLOG(INFO) << __FUNCTION__ << me() << "POST request with no data!"; + DVLOG(1) << __FUNCTION__ << me() << "POST request with no data!"; } } @@ -482,10 +482,10 @@ STDMETHODIMP UrlmonUrlRequest::OnDataAvailable(DWORD flags, DWORD size, FORMATETC* formatetc, STGMEDIUM* storage) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DLOG(INFO) << __FUNCTION__ << me() << "bytes available: " << size; + DVLOG(1) << __FUNCTION__ << me() << "bytes available: " << size; if (terminate_requested()) { - DLOG(INFO) << " Download requested. INET_E_TERMINATED_BIND returned"; + DVLOG(1) << " Download requested. INET_E_TERMINATED_BIND returned"; return INET_E_TERMINATED_BIND; } @@ -506,19 +506,19 @@ STDMETHODIMP UrlmonUrlRequest::OnDataAvailable(DWORD flags, DWORD size, if (pending_read_size_) { size_t bytes_copied = SendDataToDelegate(pending_read_size_); - DLOG(INFO) << __FUNCTION__ << me() << "size read: " << bytes_copied; + DVLOG(1) << __FUNCTION__ << me() << "size read: " << bytes_copied; } else { - DLOG(INFO) << __FUNCTION__ << me() << "- waiting for remote read"; + DVLOG(1) << __FUNCTION__ << me() << "- waiting for remote read"; } if (BSCF_LASTDATANOTIFICATION & flags) { if (!is_expecting_download_ || pending()) { - DLOG(INFO) << __FUNCTION__ << me() << "EOF"; + DVLOG(1) << __FUNCTION__ << me() << "EOF"; return S_OK; } // Always return INET_E_TERMINATED_BIND to allow bind context reuse // if DownloadToHost is suddenly requested. - DLOG(INFO) << __FUNCTION__ << " EOF: INET_E_TERMINATED_BIND returned"; + DVLOG(1) << __FUNCTION__ << " EOF: INET_E_TERMINATED_BIND returned"; return INET_E_TERMINATED_BIND; } return S_OK; @@ -540,7 +540,7 @@ STDMETHODIMP UrlmonUrlRequest::BeginningTransaction(const wchar_t* url, return E_POINTER; } - DLOG(INFO) << __FUNCTION__ << me() << "headers: \n" << current_headers; + DVLOG(1) << __FUNCTION__ << me() << "headers: \n" << current_headers; if (status_.get_state() == Status::ABORTING) { // At times the BINDSTATUS_REDIRECTING notification which is sent to the @@ -608,7 +608,7 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode, const wchar_t* response_headers, const wchar_t* request_headers, wchar_t** additional_headers) { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DLOG(INFO) << __FUNCTION__ << me() << "headers: \n" << response_headers; + DVLOG(1) << __FUNCTION__ << me() << "headers: \n" << response_headers; if (!delegate_) { DLOG(WARNING) << "Invalid delegate"; @@ -643,7 +643,7 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode, } } - DLOG(INFO) << __FUNCTION__ << me() << "Calling OnResponseStarted"; + DVLOG(1) << __FUNCTION__ << me() << "Calling OnResponseStarted"; // Inform the delegate. headers_received_ = true; @@ -666,12 +666,14 @@ STDMETHODIMP UrlmonUrlRequest::GetWindow(const GUID& guid_reason, #ifndef NDEBUG wchar_t guid[40] = {0}; ::StringFromGUID2(guid_reason, guid, arraysize(guid)); - - DLOG(INFO) << __FUNCTION__ << me() << "GetWindow: " << - (guid_reason == IID_IAuthenticate ? L" - IAuthenticate" : - (guid_reason == IID_IHttpSecurity ? L"IHttpSecurity" : - (guid_reason == IID_IWindowForBindingUI ? L"IWindowForBindingUI" : - guid))); + const wchar_t* str = guid; + if (guid_reason == IID_IAuthenticate) + str = L"IAuthenticate"; + else if (guid_reason == IID_IHttpSecurity) + str = L"IHttpSecurity"; + else if (guid_reason == IID_IWindowForBindingUI) + str = L"IWindowForBindingUI"; + DVLOG(1) << __FUNCTION__ << me() << "GetWindow: " << str; #endif // We should return a non-NULL HWND as parent. Otherwise no dialog is shown. // TODO(iyengar): This hits when running the URL request tests. @@ -723,7 +725,7 @@ STDMETHODIMP UrlmonUrlRequest::OnSecurityProblem(DWORD problem) { // decided to go with the easier option of implementing the IHttpSecurity // interface and replicating the checks performed by Urlmon. This // causes Urlmon to display a dialog box on the same lines as IE6. - DLOG(INFO) << __FUNCTION__ << me() << "Security problem : " << problem; + DVLOG(1) << __FUNCTION__ << me() << "Security problem : " << problem; // On IE6 the default IBindStatusCallback interface does not implement the // IHttpSecurity interface and thus causes IE to put up a certificate error @@ -756,7 +758,7 @@ STDMETHODIMP UrlmonUrlRequest::OnSecurityProblem(DWORD problem) { } HRESULT UrlmonUrlRequest::StartAsyncDownload() { - DLOG(INFO) << __FUNCTION__ << me() << url(); + DVLOG(1) << __FUNCTION__ << me() << url(); HRESULT hr = E_FAIL; DCHECK((moniker_ && bind_context_) || (!moniker_ && !bind_context_)); @@ -821,7 +823,7 @@ HRESULT UrlmonUrlRequest::StartAsyncDownload() { void UrlmonUrlRequest::NotifyDelegateAndDie() { DCHECK_EQ(thread_, PlatformThread::CurrentId()); - DLOG(INFO) << __FUNCTION__ << me(); + DVLOG(1) << __FUNCTION__ << me(); PluginUrlRequestDelegate* delegate = delegate_; delegate_ = NULL; @@ -955,7 +957,7 @@ void UrlmonUrlRequestManager::SetInfoForUrl(const std::wstring& url, void UrlmonUrlRequestManager::StartRequest(int request_id, const IPC::AutomationURLRequest& request_info) { - DLOG(INFO) << __FUNCTION__ << " id: " << request_id; + DVLOG(1) << __FUNCTION__ << " id: " << request_id; DCHECK_EQ(0, calling_delegate_); if (stopping_) { @@ -972,8 +974,8 @@ void UrlmonUrlRequestManager::StartRequest(int request_id, DCHECK_EQ(pending_request_->url(), request_info.url); new_request.swap(pending_request_); is_started = true; - DLOG(INFO) << __FUNCTION__ << new_request->me() - << "assigned id " << request_id; + DVLOG(1) << __FUNCTION__ << new_request->me() + << " assigned id " << request_id; } else { CComObject<UrlmonUrlRequest>* created_request = NULL; CComObject<UrlmonUrlRequest>::CreateInstance(&created_request); @@ -1007,7 +1009,7 @@ void UrlmonUrlRequestManager::StartRequest(int request_id, } void UrlmonUrlRequestManager::ReadRequest(int request_id, int bytes_to_read) { - DLOG(INFO) << __FUNCTION__ << " id: " << request_id; + DVLOG(1) << __FUNCTION__ << " id: " << request_id; DCHECK_EQ(0, calling_delegate_); scoped_refptr<UrlmonUrlRequest> request = LookupRequest(request_id); // if zero, it may just have had network error. @@ -1016,7 +1018,7 @@ void UrlmonUrlRequestManager::ReadRequest(int request_id, int bytes_to_read) { } void UrlmonUrlRequestManager::DownloadRequestInHost(int request_id) { - DLOG(INFO) << __FUNCTION__ << " " << request_id; + DVLOG(1) << __FUNCTION__ << " " << request_id; if (IsWindow(notification_window_)) { scoped_refptr<UrlmonUrlRequest> request(LookupRequest(request_id)); if (request) { @@ -1027,8 +1029,8 @@ void UrlmonUrlRequestManager::DownloadRequestInHost(int request_id) { NOTREACHED(); } } else { - NOTREACHED() - << "Cannot handle download if we don't have anyone to hand it to."; + NOTREACHED() << "Cannot handle download if we don't have anyone to hand it " + "to."; } } @@ -1065,7 +1067,7 @@ void UrlmonUrlRequestManager::GetCookiesForUrl(const GURL& url, int cookie_id) { } else { success = false; error = GetLastError(); - DLOG(INFO) << "InternetGetCookie failed. Error: " << error; + DVLOG(1) << "InternetGetCookie failed. Error: " << error; } OnCookiesRetrieved(success, url, cookie_string, cookie_id); @@ -1098,7 +1100,7 @@ void UrlmonUrlRequestManager::SetCookiesForUrl(const GURL& url, } void UrlmonUrlRequestManager::EndRequest(int request_id) { - DLOG(INFO) << __FUNCTION__ << " id: " << request_id; + DVLOG(1) << __FUNCTION__ << " id: " << request_id; DCHECK_EQ(0, calling_delegate_); scoped_refptr<UrlmonUrlRequest> request = LookupRequest(request_id); if (request) { @@ -1110,14 +1112,14 @@ void UrlmonUrlRequestManager::EndRequest(int request_id) { } void UrlmonUrlRequestManager::StopAll() { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (stopping_) return; stopping_ = true; - DLOG(INFO) << __FUNCTION__ << " stopping " << - request_map_.size() << " requests"; + DVLOG(1) << __FUNCTION__ << " stopping " << request_map_.size() + << " requests"; for (RequestMap::iterator it = request_map_.begin(); it != request_map_.end(); ++it) { @@ -1133,7 +1135,7 @@ void UrlmonUrlRequestManager::OnResponseStarted(int request_id, base::Time last_modified, const std::string& redirect_url, int redirect_status) { DCHECK_NE(request_id, -1); - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(LookupRequest(request_id) != NULL); ++calling_delegate_; delegate_->OnResponseStarted(request_id, mime_type, headers, size, @@ -1144,18 +1146,18 @@ void UrlmonUrlRequestManager::OnResponseStarted(int request_id, void UrlmonUrlRequestManager::OnReadComplete(int request_id, const std::string& data) { DCHECK_NE(request_id, -1); - DLOG(INFO) << __FUNCTION__ << " id: " << request_id; + DVLOG(1) << __FUNCTION__ << " id: " << request_id; DCHECK(LookupRequest(request_id) != NULL); ++calling_delegate_; delegate_->OnReadComplete(request_id, data); --calling_delegate_; - DLOG(INFO) << __FUNCTION__ << " done id: " << request_id; + DVLOG(1) << __FUNCTION__ << " done id: " << request_id; } void UrlmonUrlRequestManager::OnResponseEnd(int request_id, const URLRequestStatus& status) { DCHECK_NE(request_id, -1); - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; DCHECK(status.status() != URLRequestStatus::CANCELED); RequestMap::size_type n = request_map_.erase(request_id); DCHECK_EQ(1u, n); diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 4437668..6af8560 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -845,7 +845,7 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, // IE6 LPOLESTR url = NULL; if (SUCCEEDED(hr = moniker->GetDisplayName(bind_ctx, NULL, &url))) { - DLOG(INFO) << __FUNCTION__ << " " << url; + DVLOG(1) << __FUNCTION__ << " " << url; ScopedComPtr<IWebBrowserPriv> browser_priv; if (SUCCEEDED(hr = browser_priv.QueryFrom(web_browser2))) { GURL target_url(url); @@ -968,12 +968,12 @@ bool IsSubFrameRequest(IUnknown* service_provider) { // Only the top level window will return self when get_parent is called. current_frame->get_parent(parent_frame.Receive()); if (parent_frame != current_frame) { - DLOG(INFO) << "Sub frame detected"; + DVLOG(1) << "Sub frame detected"; is_sub_frame_request = true; } } } else { - DLOG(INFO) << "IsSubFrameRequest - no IWebBrowser2"; + DVLOG(1) << "IsSubFrameRequest - no IWebBrowser2"; is_sub_frame_request = true; } @@ -1124,7 +1124,7 @@ std::string GetHttpHeadersFromBinding(IBinding* binding) { } int GetHttpResponseStatusFromBinding(IBinding* binding) { - DLOG(INFO) << __FUNCTION__; + DVLOG(1) << __FUNCTION__; if (binding == NULL) { DLOG(WARNING) << "GetHttpResponseStatus - no binding_"; return 0; diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h index 4ec548a..4849a803 100644 --- a/chrome_frame/utils.h +++ b/chrome_frame/utils.h @@ -350,8 +350,8 @@ STDMETHODIMP CheckOutgoingInterface(void* obj, REFIID iid, void** ret, if (SUCCEEDED(hr)) { wchar_t iid_string[64] = {0}; StringFromGUID2(iid, iid_string, arraysize(iid_string)); - DLOG(INFO) << __FUNCTION__ << " Giving out wrapped interface: " - << iid_string; + DVLOG(1) << __FUNCTION__ << " Giving out wrapped interface: " + << iid_string; } #endif } |