diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:58:58 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 00:58:58 +0000 |
commit | 11c2688a90c8626c77e4855d601d9e7b180e51fc (patch) | |
tree | 81966be2fe14d4a6a489c81029a03a66534ea5e4 /chrome/common | |
parent | 5dc6e5c358d5ee756e7fdac33cd257e7b17d94e3 (diff) | |
download | chromium_src-11c2688a90c8626c77e4855d601d9e7b180e51fc.zip chromium_src-11c2688a90c8626c77e4855d601d9e7b180e51fc.tar.gz chromium_src-11c2688a90c8626c77e4855d601d9e7b180e51fc.tar.bz2 |
Convert LOG(INFO) to VLOG(1) - chrome/common/.
This also removes LOG_RESOURCE_REQUESTS and all associated code.
Also remove some "using"s, fix non-const ref (style violation), remove some "else" after "return", and remove some extra {}s.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3941001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63462 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_lib.cc | 13 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 2 | ||||
-rw-r--r-- | chrome/common/deprecated/event_sys_unittest.cc | 38 | ||||
-rw-r--r-- | chrome/common/extensions/extension_file_util.cc | 14 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unpacker.cc | 2 | ||||
-rw-r--r-- | chrome/common/metrics_helpers.cc | 6 | ||||
-rw-r--r-- | chrome/common/net/gaia/gaia_authenticator2.cc | 15 | ||||
-rw-r--r-- | chrome/common/notification_service.cc | 13 | ||||
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 48 | ||||
-rw-r--r-- | chrome/common/sandbox_policy.cc | 2 | ||||
-rw-r--r-- | chrome/common/service_process_util_posix.cc | 2 | ||||
-rw-r--r-- | chrome/common/socket_stream_dispatcher.cc | 31 |
12 files changed, 64 insertions, 122 deletions
diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc index f0dd8c1..3277f4a 100644 --- a/chrome/common/chrome_plugin_lib.cc +++ b/chrome/common/chrome_plugin_lib.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 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. @@ -198,8 +198,8 @@ ChromePluginLib::~ChromePluginLib() { } bool ChromePluginLib::CP_Initialize(const CPBrowserFuncs* bfuncs) { - LOG(INFO) << "ChromePluginLib::CP_Initialize(" << filename_.value() << - "): initialized=" << initialized_; + VLOG(1) << "ChromePluginLib::CP_Initialize(" << filename_.value() + << "): initialized=" << initialized_; if (initialized_) return true; @@ -210,7 +210,7 @@ bool ChromePluginLib::CP_Initialize(const CPBrowserFuncs* bfuncs) { uint16 selected_version = 0; CPError rv = CP_VersionNegotiate_(CP_VERSION, CP_VERSION, &selected_version); - if ( (rv != CPERR_SUCCESS) || (selected_version != CP_VERSION)) + if ((rv != CPERR_SUCCESS) || (selected_version != CP_VERSION)) return false; } @@ -219,9 +219,8 @@ bool ChromePluginLib::CP_Initialize(const CPBrowserFuncs* bfuncs) { initialized_ = (rv == CPERR_SUCCESS) && (CP_GET_MAJOR_VERSION(plugin_funcs_.version) == CP_MAJOR_VERSION) && (CP_GET_MINOR_VERSION(plugin_funcs_.version) <= CP_MINOR_VERSION); - LOG(INFO) << "ChromePluginLib::CP_Initialize(" << filename_.value() << - "): initialized=" << initialized_ << - "): result=" << rv; + VLOG(1) << "ChromePluginLib::CP_Initialize(" << filename_.value() + << "): initialized=" << initialized_ << "): result=" << rv; return initialized_; } diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index e2e36b5..9847a38 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -688,7 +688,7 @@ const char kLoadPlugin[] = "load-plugin"; // Load NPAPI plugins from the specified directory. const char kExtraPluginDir[] = "extra-plugin-dir"; -// Make plugin processes log their sent and received messages to LOG(INFO). +// Make plugin processes log their sent and received messages to VLOG(1). const char kLogPluginMessages[] = "log-plugin-messages"; // Sets the minimum log level. Valid values are from 0 to 3: diff --git a/chrome/common/deprecated/event_sys_unittest.cc b/chrome/common/deprecated/event_sys_unittest.cc index 2c55038..3e7957e 100644 --- a/chrome/common/deprecated/event_sys_unittest.cc +++ b/chrome/common/deprecated/event_sys_unittest.cc @@ -15,12 +15,6 @@ #include "chrome/common/deprecated/event_sys-inl.h" #include "testing/gtest/include/gtest/gtest.h" -using std::endl; -using std::ostream; -using std::string; -using std::stringstream; -using std::vector; - namespace { class Pair; @@ -43,7 +37,7 @@ struct TestEventTraits { class Pair { public: typedef EventChannel<TestEventTraits> Channel; - explicit Pair(const string& name) : name_(name), a_(0), b_(0) { + explicit Pair(const std::string& name) : name_(name), a_(0), b_(0) { TestEvent shutdown = { this, TestEvent::PAIR_BEING_DELETED, 0 }; event_channel_ = new Channel(shutdown); } @@ -62,11 +56,11 @@ class Pair { } int a() const { return a_; } int b() const { return b_; } - const string& name() { return name_; } + const std::string& name() { return name_; } Channel* event_channel() const { return event_channel_; } protected: - const string name_; + const std::string name_; int a_; int b_; Channel* event_channel_; @@ -74,19 +68,19 @@ class Pair { class EventLogger { public: - explicit EventLogger(ostream& out) : out_(out) { } + explicit EventLogger(std::ostream* out) : out_(out) { } ~EventLogger() { for (Hookups::iterator i = hookups_.begin(); i != hookups_.end(); ++i) delete *i; } - void Hookup(const string name, Pair::Channel* channel) { + void Hookup(const std::string name, Pair::Channel* channel) { hookups_.push_back(NewEventListenerHookup(channel, this, &EventLogger::HandlePairEvent, name)); } - void HandlePairEvent(const string& name, const TestEvent& event) { + void HandlePairEvent(const std::string& name, const TestEvent& event) { const char* what_changed = NULL; int new_value = 0; Hookups::iterator dead; @@ -100,21 +94,21 @@ class EventLogger { new_value = event.source->b(); break; case TestEvent::PAIR_BEING_DELETED: - out_ << name << " heard " << event.source->name() << " being deleted." - << endl; + *out_ << name << " heard " << event.source->name() << " being deleted." + << std::endl; return; default: FAIL() << "Bad event.what_happened: " << event.what_happened; break; } - out_ << name << " heard " << event.source->name() << "'s " << what_changed - << " change from " - << event.old_value << " to " << new_value << endl; + *out_ << name << " heard " << event.source->name() << "'s " << what_changed + << " change from " << event.old_value + << " to " << new_value << std::endl; } - typedef vector<EventListenerHookup*> Hookups; + typedef std::vector<EventListenerHookup*> Hookups; Hookups hookups_; - ostream& out_; + std::ostream* out_; }; const char golden_result[] = "Larry heard Sally's B change from 0 to 2\n" @@ -126,8 +120,8 @@ const char golden_result[] = "Larry heard Sally's B change from 0 to 2\n" TEST(EventSys, Basic) { Pair sally("Sally"), sam("Sam"); sally.set_a(1); - stringstream log; - EventLogger logger(log); + std::stringstream log; + EventLogger logger(&log); logger.Hookup("Larry", sally.event_channel()); sally.set_b(2); sally.set_a(3); @@ -236,7 +230,7 @@ class ThreadTester : public EventListener<TestEvent>, bool remove_event_bool_; Lock completed_mutex_; bool completed_; - vector<ThreadInfo> threads_; + std::vector<ThreadInfo> threads_; ThreadArgs args_; }; diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index fa764b6..d530357 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -290,7 +290,7 @@ void GarbageCollectExtensions( if (!file_util::DirectoryExists(install_directory)) return; - LOG(INFO) << "Garbage collecting extensions..."; + VLOG(1) << "Garbage collecting extensions..."; file_util::FileEnumerator enumerator(install_directory, false, // Not recursive. file_util::FileEnumerator::DIRECTORIES); @@ -304,8 +304,8 @@ void GarbageCollectExtensions( if (!Extension::IdIsValid(extension_id)) { LOG(WARNING) << "Invalid extension ID encountered in extensions " "directory: " << extension_id; - LOG(INFO) << "Deleting invalid extension directory " - << WideToASCII(extension_path.ToWStringHack()) << "."; + VLOG(1) << "Deleting invalid extension directory " + << WideToASCII(extension_path.ToWStringHack()) << "."; file_util::Delete(extension_path, true); // Recursive. continue; } @@ -317,8 +317,8 @@ void GarbageCollectExtensions( // move on. This can legitimately happen when an uninstall does not // complete, for example, when a plugin is in use at uninstall time. if (iter == extension_paths.end()) { - LOG(INFO) << "Deleting unreferenced install for directory " - << WideToASCII(extension_path.ToWStringHack()) << "."; + VLOG(1) << "Deleting unreferenced install for directory " + << WideToASCII(extension_path.ToWStringHack()) << "."; file_util::Delete(extension_path, true); // Recursive. continue; } @@ -332,8 +332,8 @@ void GarbageCollectExtensions( !version_dir.value().empty(); version_dir = versions_enumerator.Next()) { if (version_dir.BaseName() != iter->second.BaseName()) { - LOG(INFO) << "Deleting old version for directory " - << WideToASCII(version_dir.ToWStringHack()) << "."; + VLOG(1) << "Deleting old version for directory " + << WideToASCII(version_dir.ToWStringHack()) << "."; file_util::Delete(version_dir, true); // Recursive. } } diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc index a758a55..d431bcb 100644 --- a/chrome/common/extensions/extension_unpacker.cc +++ b/chrome/common/extensions/extension_unpacker.cc @@ -143,7 +143,7 @@ bool ExtensionUnpacker::ReadAllMessageCatalogs( } bool ExtensionUnpacker::Run() { - LOG(INFO) << "Installing extension " << extension_path_.value(); + VLOG(1) << "Installing extension " << extension_path_.value(); // <profile>/Extensions/INSTALL_TEMP/<version> temp_install_dir_ = diff --git a/chrome/common/metrics_helpers.cc b/chrome/common/metrics_helpers.cc index 4fb11b7..6dd0a42 100644 --- a/chrome/common/metrics_helpers.cc +++ b/chrome/common/metrics_helpers.cc @@ -195,15 +195,15 @@ std::string MetricsLogBase::CreateHash(const std::string& value) { // name. We can then use this logging to find out what histogram name was // being hashed to a given MD5 value by just running the version of Chromium // in question with --enable-logging. - LOG(INFO) << "Metrics: Hash numeric [" << value << "]=[" - << reverse_uint64 << "]"; + VLOG(1) << "Metrics: Hash numeric [" << value + << "]=[" << reverse_uint64 << "]"; return std::string(reinterpret_cast<char*>(digest.a), arraysize(digest.a)); } std::string MetricsLogBase::CreateBase64Hash(const std::string& string) { std::string encoded_digest; if (base::Base64Encode(CreateHash(string), &encoded_digest)) { - DLOG(INFO) << "Metrics: Hash [" << encoded_digest << "]=[" << string << "]"; + DVLOG(1) << "Metrics: Hash [" << encoded_digest << "]=[" << string << "]"; return encoded_digest; } return std::string(); diff --git a/chrome/common/net/gaia/gaia_authenticator2.cc b/chrome/common/net/gaia/gaia_authenticator2.cc index 03a00928..108d76c 100644 --- a/chrome/common/net/gaia/gaia_authenticator2.cc +++ b/chrome/common/net/gaia/gaia_authenticator2.cc @@ -252,7 +252,7 @@ void GaiaAuthenticator2::StartClientLogin( // This class is thread agnostic, so be sure to call this only on the // same thread each time. - LOG(INFO) << "Starting new ClientLogin fetch for:" << username; + VLOG(1) << "Starting new ClientLogin fetch for:" << username; // Must outlive fetcher_. request_body_ = MakeClientLoginBody(username, @@ -276,7 +276,7 @@ void GaiaAuthenticator2::StartIssueAuthToken(const std::string& sid, DCHECK(!fetch_pending_) << "Tried to fetch two things at once!"; - LOG(INFO) << "Starting IssueAuthToken for: " << service; + VLOG(1) << "Starting IssueAuthToken for: " << service; requested_service_ = service; request_body_ = MakeIssueAuthTokenBody(sid, lsid, service); fetcher_.reset(CreateGaiaFetcher(getter_, @@ -291,7 +291,7 @@ void GaiaAuthenticator2::StartGetUserInfo(const std::string& lsid, const std::string& info_key) { DCHECK(!fetch_pending_) << "Tried to fetch two things at once!"; - LOG(INFO) << "Starting GetUserInfo for lsid=" << lsid; + VLOG(1) << "Starting GetUserInfo for lsid=" << lsid; request_body_ = MakeGetUserInfoBody(lsid); fetcher_.reset(CreateGaiaFetcher(getter_, request_body_, @@ -332,11 +332,12 @@ GoogleServiceAuthError GaiaAuthenticator2::GenerateAuthError( GURL unlock_url(url); return GoogleServiceAuthError::FromCaptchaChallenge( captcha_token, image_url, unlock_url); - } else if (error == kAccountDeletedError) { + } + if (error == kAccountDeletedError) return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DELETED); - } else if (error == kAccountDisabledError) { + if (error == kAccountDisabledError) return GoogleServiceAuthError(GoogleServiceAuthError::ACCOUNT_DISABLED); - } else if (error == kServiceUnavailableError) { + if (error == kServiceUnavailableError) { return GoogleServiceAuthError( GoogleServiceAuthError::SERVICE_UNAVAILABLE); } @@ -353,7 +354,7 @@ void GaiaAuthenticator2::OnClientLoginFetched(const std::string& data, int response_code) { if (status.is_success() && response_code == RC_REQUEST_OK) { - LOG(INFO) << "ClientLogin successful!"; + VLOG(1) << "ClientLogin successful!"; std::string sid; std::string lsid; std::string token; diff --git a/chrome/common/notification_service.cc b/chrome/common/notification_service.cc index f04f554..b3c2768 100644 --- a/chrome/common/notification_service.cc +++ b/chrome/common/notification_service.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 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. @@ -132,12 +132,8 @@ NotificationService::~NotificationService() { if (observer_counts_[i] > 0) { // This may not be completely fixable -- see // http://code.google.com/p/chromium/issues/detail?id=11010 . - - // It would be nice to track new leaks, but this currently - // spams the console too much to be useful, making it hard to track - // down other problems. - // LOG(INFO) << observer_counts_[i] << " notification observer(s) leaked" - // << " of notification type " << i; + VLOG(1) << observer_counts_[i] << " notification observer(s) leaked " + " of notification type " << i; } } #endif @@ -145,9 +141,8 @@ NotificationService::~NotificationService() { for (int i = 0; i < NotificationType::NOTIFICATION_TYPE_COUNT; i++) { NotificationSourceMap omap = observers_[i]; for (NotificationSourceMap::iterator it = omap.begin(); - it != omap.end(); ++it) { + it != omap.end(); ++it) delete it->second; - } } } diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index ba15ab2..0f192f1 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -24,15 +24,6 @@ #include "webkit/glue/resource_type.h" #include "webkit/glue/webkit_glue.h" -// Uncomment to enable logging of request traffic -// #define LOG_RESOURCE_REQUESTS - -#ifdef LOG_RESOURCE_REQUESTS -# define RESOURCE_LOG(stuff) LOG(INFO) << stuff -#else -# define RESOURCE_LOG(stuff) -#endif - // Each resource request is assigned an ID scoped to this process. static int MakeRequestID() { // NOTE: The resource_dispatcher_host also needs probably unique @@ -68,10 +59,6 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { virtual void SetDefersLoading(bool value); virtual void SyncLoad(SyncLoadResponse* response); -#ifdef LOG_RESOURCE_REQUESTS - const std::string& url() const { return url_; } -#endif - private: ResourceLoaderBridge::Peer* peer_; @@ -89,11 +76,6 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { // The routing id used when sending IPC messages. int routing_id_; -#ifdef LOG_RESOURCE_REQUESTS - // indicates the URL of this resource request for help debugging - std::string url_; -#endif - // The following two members are specified if the request is initiated by // a plugin like Gears. @@ -131,10 +113,6 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge( request_.download_to_file = request_info.download_to_file; request_.host_renderer_id = host_renderer_id_; request_.host_render_view_id = host_render_view_id_; - -#ifdef LOG_RESOURCE_REQUESTS - url_ = request_.url.possibly_invalid_spec(); -#endif } IPCResourceLoaderBridge::~IPCResourceLoaderBridge() { @@ -199,8 +177,6 @@ bool IPCResourceLoaderBridge::Start(Peer* peer) { return false; } - RESOURCE_LOG("Starting request for " << url_); - peer_ = peer; // generate the request ID, and append it to the message @@ -217,8 +193,6 @@ void IPCResourceLoaderBridge::Cancel() { return; } - RESOURCE_LOG("Canceling request for " << url_); - dispatcher_->CancelPendingRequest(routing_id_, request_id_); // We can't remove the request ID from the resource dispatcher because more @@ -242,8 +216,6 @@ void IPCResourceLoaderBridge::SyncLoad(SyncLoadResponse* response) { return; } - RESOURCE_LOG("Making sync request for " << url_); - request_id_ = MakeRequestID(); SyncLoadResult result; @@ -343,8 +315,6 @@ void ResourceDispatcher::OnUploadProgress( if (!request_info) return; - RESOURCE_LOG("Dispatching upload progress for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); request_info->peer->OnUploadProgress(position, size); // Acknowledge receipt @@ -367,8 +337,6 @@ void ResourceDispatcher::OnReceivedResponse( request_info->peer = new_peer; } - RESOURCE_LOG("Dispatching response for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); request_info->peer->OnReceivedResponse(response_head, false); } @@ -378,11 +346,8 @@ void ResourceDispatcher::OnReceivedCachedMetadata( if (!request_info) return; - if (data.size()) { - RESOURCE_LOG("Dispatching " << data.size() << " metadata bytes for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); + if (data.size()) request_info->peer->OnReceivedCachedMetadata(&data.front(), data.size()); - } } void ResourceDispatcher::OnReceivedData(const IPC::Message& message, @@ -402,8 +367,6 @@ void ResourceDispatcher::OnReceivedData(const IPC::Message& message, return; if (data_len > 0 && shared_mem.Map(data_len)) { - RESOURCE_LOG("Dispatching " << data_len << " bytes for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); const char* data = static_cast<char*>(shared_mem.memory()); request_info->peer->OnReceivedData(data, data_len); } @@ -420,8 +383,6 @@ void ResourceDispatcher::OnDownloadedData(const IPC::Message& message, if (!request_info) return; - RESOURCE_LOG("Dispatching " << data_len << " downloaded for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); request_info->peer->OnDownloadedData(data_len); } @@ -434,10 +395,6 @@ void ResourceDispatcher::OnReceivedRedirect( if (!request_info) return; - RESOURCE_LOG( - "Dispatching redirect for " << - request_info->peer->GetURLForDebugging().possibly_invalid_spec()); - bool has_new_first_party_for_cookies = false; GURL new_first_party_for_cookies; if (request_info->peer->OnReceivedRedirect(new_url, info, @@ -462,9 +419,6 @@ void ResourceDispatcher::OnRequestComplete(int request_id, webkit_glue::ResourceLoaderBridge::Peer* peer = request_info->peer; - RESOURCE_LOG("Dispatching complete for " << - peer->GetURLForDebugging().possibly_invalid_spec()); - if (status.status() == URLRequestStatus::CANCELED && status.os_error() != net::ERR_ABORTED) { // Resource canceled with a specific error are filtered. diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc index a5667af..f97da8a 100644 --- a/chrome/common/sandbox_policy.cc +++ b/chrome/common/sandbox_policy.cc @@ -173,7 +173,7 @@ void AddDllEvictionPolicy(sandbox::TargetPolicy* policy) { // To minimize the list we only add an unload policy if the dll is also // loaded in this process. All the injected dlls of interest do this. if (::GetModuleHandleW(kTroublesomeDlls[ix])) { - LOG(INFO) << "dll to unload found: " << kTroublesomeDlls[ix]; + VLOG(1) << "dll to unload found: " << kTroublesomeDlls[ix]; policy->AddDllToUnload(kTroublesomeDlls[ix]); } } diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc index e3db81d..e547223 100644 --- a/chrome/common/service_process_util_posix.cc +++ b/chrome/common/service_process_util_posix.cc @@ -52,7 +52,7 @@ void ServiceProcessState::SignalReady(Task* shutdown_task) { FILE* file = file_util::OpenFile(path, "wb+"); if (!file) return; - LOG(INFO) << "Created Service Process lock file: " << path.value(); + VLOG(1) << "Created Service Process lock file: " << path.value(); file_util::TruncateFile(file) && file_util::CloseFile(file); } diff --git a/chrome/common/socket_stream_dispatcher.cc b/chrome/common/socket_stream_dispatcher.cc index 1ad0be6..af95d5c 100644 --- a/chrome/common/socket_stream_dispatcher.cc +++ b/chrome/common/socket_stream_dispatcher.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. @@ -69,8 +69,8 @@ IPCWebSocketStreamHandleBridge* IPCWebSocketStreamHandleBridge::FromSocketId( } IPCWebSocketStreamHandleBridge::~IPCWebSocketStreamHandleBridge() { - DLOG(INFO) << "IPCWebSocketStreamHandleBridge destructor socket_id=" - << socket_id_; + DVLOG(1) << "IPCWebSocketStreamHandleBridge destructor socket_id=" + << socket_id_; if (socket_id_ != chrome_common_net::kNoSocketId) { child_thread_->Send(new ViewHostMsg_Close(socket_id_)); socket_id_ = chrome_common_net::kNoSocketId; @@ -79,7 +79,7 @@ IPCWebSocketStreamHandleBridge::~IPCWebSocketStreamHandleBridge() { void IPCWebSocketStreamHandleBridge::Connect(const GURL& url) { DCHECK(child_thread_); - DLOG(INFO) << "Connect url=" << url; + DVLOG(1) << "Connect url=" << url; child_thread_->message_loop()->PostTask( FROM_HERE, NewRunnableMethod(this, &IPCWebSocketStreamHandleBridge::DoConnect, @@ -88,9 +88,9 @@ void IPCWebSocketStreamHandleBridge::Connect(const GURL& url) { bool IPCWebSocketStreamHandleBridge::Send( const std::vector<char>& data) { - DLOG(INFO) << "Send data.size=" << data.size(); + DVLOG(1) << "Send data.size=" << data.size(); if (child_thread_->Send( - new ViewHostMsg_SocketStream_SendData(socket_id_, data))) { + new ViewHostMsg_SocketStream_SendData(socket_id_, data))) { if (delegate_) delegate_->WillSendData(handle_, &data[0], data.size()); return true; @@ -99,13 +99,13 @@ bool IPCWebSocketStreamHandleBridge::Send( } void IPCWebSocketStreamHandleBridge::Close() { - DLOG(INFO) << "Close socket_id" << socket_id_; + DVLOG(1) << "Close socket_id" << socket_id_; child_thread_->Send(new ViewHostMsg_SocketStream_Close(socket_id_)); } void IPCWebSocketStreamHandleBridge::OnConnected(int max_pending_send_allowed) { - DLOG(INFO) << "IPCWebSocketStreamHandleBridge::OnConnected socket_id=" - << socket_id_; + DVLOG(1) << "IPCWebSocketStreamHandleBridge::OnConnected socket_id=" + << socket_id_; if (delegate_) delegate_->DidOpenStream(handle_, max_pending_send_allowed); } @@ -122,14 +122,13 @@ void IPCWebSocketStreamHandleBridge::OnReceivedData( } void IPCWebSocketStreamHandleBridge::OnClosed() { - DLOG(INFO) << "IPCWebSocketStreamHandleBridge::OnClosed"; + DVLOG(1) << "IPCWebSocketStreamHandleBridge::OnClosed"; if (socket_id_ != chrome_common_net::kNoSocketId) { all_bridges.Remove(socket_id_); socket_id_ = chrome_common_net::kNoSocketId; } - if (delegate_) { + if (delegate_) delegate_->DidClose(handle_); - } delegate_ = NULL; Release(); } @@ -143,8 +142,8 @@ void IPCWebSocketStreamHandleBridge::DoConnect(const GURL& url) { socket_id_ = all_bridges.Add(this); DCHECK_NE(socket_id_, chrome_common_net::kNoSocketId); if (child_thread_->Send( - new ViewHostMsg_SocketStream_Connect(url, socket_id_))) { - DLOG(INFO) << "Connect socket_id=" << socket_id_; + new ViewHostMsg_SocketStream_Connect(url, socket_id_))) { + DVLOG(1) << "Connect socket_id=" << socket_id_; AddRef(); // Released in OnClosed(). // TODO(ukai): timeout to OnConnected. } else { @@ -179,8 +178,8 @@ bool SocketStreamDispatcher::OnMessageReceived(const IPC::Message& msg) { void SocketStreamDispatcher::OnConnected(int socket_id, int max_pending_send_allowed) { - DLOG(INFO) << "SocketStreamDispatcher::OnConnected socket_id=" << socket_id - << " max_pending_send_allowed=" << max_pending_send_allowed; + DVLOG(1) << "SocketStreamDispatcher::OnConnected socket_id=" << socket_id + << " max_pending_send_allowed=" << max_pending_send_allowed; IPCWebSocketStreamHandleBridge* bridge = IPCWebSocketStreamHandleBridge::FromSocketId(socket_id); if (bridge) |