summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 21:56:18 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-21 21:56:18 +0000
commit4deb9db944ab33d86ba3a88edf8a8f34afe1fd54 (patch)
treeac0a560afdbf320d7061f1b6dc8b70a5dab14bdc
parent59a3b36577ed3d3adb70f119033fd82223ddd3bb (diff)
downloadchromium_src-4deb9db944ab33d86ba3a88edf8a8f34afe1fd54.zip
chromium_src-4deb9db944ab33d86ba3a88edf8a8f34afe1fd54.tar.gz
chromium_src-4deb9db944ab33d86ba3a88edf8a8f34afe1fd54.tar.bz2
Convert LOG(INFO) to VLOG(1) - chrome/browser/geolocation/.
This also converts a "const NSString*" to "NSString*" to remove a Clang warning. BUG=none TEST=none Review URL: http://codereview.chromium.org/4005001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63429 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/geolocation/geolocation_dispatcher_host.cc48
-rw-r--r--chrome/browser/geolocation/libgps_wrapper_linux.cc8
-rw-r--r--chrome/browser/geolocation/network_location_provider.cc6
-rw-r--r--chrome/browser/geolocation/network_location_request.cc32
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm8
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_linux.cc4
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_mac.cc8
-rw-r--r--chrome/browser/geolocation/wifi_data_provider_win.cc8
8 files changed, 63 insertions, 59 deletions
diff --git a/chrome/browser/geolocation/geolocation_dispatcher_host.cc b/chrome/browser/geolocation/geolocation_dispatcher_host.cc
index 94dbd55..5e8209c 100644
--- a/chrome/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/chrome/browser/geolocation/geolocation_dispatcher_host.cc
@@ -141,34 +141,40 @@ void GeolocationDispatcherHostImpl::OnUnregisterDispatcher(int render_view_id) {
}
void GeolocationDispatcherHostImpl::OnRequestPermission(
- int render_view_id, int bridge_id, const GURL& requesting_frame) {
+ int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
geolocation_permission_context_->RequestGeolocationPermission(
resource_message_filter_process_id_, render_view_id, bridge_id,
requesting_frame);
}
void GeolocationDispatcherHostImpl::OnCancelPermissionRequest(
- int render_view_id, int bridge_id, const GURL& requesting_frame) {
+ int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
geolocation_permission_context_->CancelGeolocationPermissionRequest(
resource_message_filter_process_id_, render_view_id, bridge_id,
requesting_frame);
}
void GeolocationDispatcherHostImpl::OnStartUpdating(
- int render_view_id, int bridge_id, const GURL& requesting_frame,
+ int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame,
bool enable_high_accuracy) {
// WebKit sends the startupdating request before checking permissions, to
// optimize the no-location-available case and reduce latency in the success
// case (location lookup happens in parallel with the permission request).
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
bridge_update_options_[std::make_pair(render_view_id, bridge_id)] =
GeolocationObserverOptions(enable_high_accuracy);
geolocation_permission_context_->StartUpdatingRequested(
@@ -177,30 +183,30 @@ void GeolocationDispatcherHostImpl::OnStartUpdating(
RefreshGeolocationObserverOptions();
}
-void GeolocationDispatcherHostImpl::OnStopUpdating(
- int render_view_id, int bridge_id) {
+void GeolocationDispatcherHostImpl::OnStopUpdating(int render_view_id,
+ int bridge_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
if (bridge_update_options_.erase(std::make_pair(render_view_id, bridge_id)))
RefreshGeolocationObserverOptions();
geolocation_permission_context_->StopUpdatingRequested(
resource_message_filter_process_id_, render_view_id, bridge_id);
}
-void GeolocationDispatcherHostImpl::OnSuspend(
- int render_view_id, int bridge_id) {
+void GeolocationDispatcherHostImpl::OnSuspend(int render_view_id,
+ int bridge_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
// TODO(bulach): connect this with GeolocationArbitrator.
}
-void GeolocationDispatcherHostImpl::OnResume(
- int render_view_id, int bridge_id) {
+void GeolocationDispatcherHostImpl::OnResume(int render_view_id,
+ int bridge_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DLOG(INFO) << __FUNCTION__ << " " << resource_message_filter_process_id_
- << ":" << render_view_id << ":" << bridge_id;
+ DVLOG(1) << __FUNCTION__ << " " << resource_message_filter_process_id_ << ":"
+ << render_view_id << ":" << bridge_id;
// TODO(bulach): connect this with GeolocationArbitrator.
}
diff --git a/chrome/browser/geolocation/libgps_wrapper_linux.cc b/chrome/browser/geolocation/libgps_wrapper_linux.cc
index f1c3728..70c5324 100644
--- a/chrome/browser/geolocation/libgps_wrapper_linux.cc
+++ b/chrome/browser/geolocation/libgps_wrapper_linux.cc
@@ -26,17 +26,17 @@ enum InitMode {
LibGpsLibraryWrapper* TryToOpen(const char* lib, InitMode mode) {
void* dl_handle = dlopen(lib, RTLD_LAZY);
if (!dl_handle) {
- LOG(INFO) << "Could not open " << lib << ": " << dlerror();
+ VLOG(1) << "Could not open " << lib << ": " << dlerror();
return NULL;
}
- LOG(INFO) << "Loaded " << lib;
+ VLOG(1) << "Loaded " << lib;
#define DECLARE_FN_POINTER(function, required) \
LibGpsLibraryWrapper::function##_fn function; \
function = reinterpret_cast<LibGpsLibraryWrapper::function##_fn>( \
dlsym(dl_handle, #function)); \
if ((required) && !function) { \
- LOG(INFO) << "libgps " << #function << " error: " << dlerror(); \
+ VLOG(1) << "libgps " << #function << " error: " << dlerror(); \
dlclose(dl_handle); \
return NULL; \
}
@@ -92,7 +92,7 @@ bool LibGps::Start() {
}
fail_count = 0;
if (!StartStreaming()) {
- LOG(INFO) << "StartStreaming failed";
+ VLOG(1) << "StartStreaming failed";
library().close();
return false;
}
diff --git a/chrome/browser/geolocation/network_location_provider.cc b/chrome/browser/geolocation/network_location_provider.cc
index cb3fbf5..86c652c 100644
--- a/chrome/browser/geolocation/network_location_provider.cc
+++ b/chrome/browser/geolocation/network_location_provider.cc
@@ -287,9 +287,9 @@ void NetworkLocationProvider::RequestPosition() {
// TODO(joth): Rather than cancel pending requests, we should create a new
// NetworkLocationRequest for each and hold a set of pending requests.
if (request_->is_request_pending()) {
- LOG(INFO) << "NetworkLocationProvider - pre-empting pending network request"
- << "with new data. Wifi APs: "
- << wifi_data_.access_point_data.size();
+ VLOG(1) << "NetworkLocationProvider - pre-empting pending network request "
+ "with new data. Wifi APs: "
+ << wifi_data_.access_point_data.size();
}
// The hostname sent in the request is just to give a first-order
// approximation of usage. We do not need to guarantee that this network
diff --git a/chrome/browser/geolocation/network_location_request.cc b/chrome/browser/geolocation/network_location_request.cc
index 9700547..cc56caf 100644
--- a/chrome/browser/geolocation/network_location_request.cc
+++ b/chrome/browser/geolocation/network_location_request.cc
@@ -93,7 +93,7 @@ bool NetworkLocationRequest::MakeRequest(const std::string& host_name,
const WifiData& wifi_data,
const base::Time& timestamp) {
if (url_fetcher_ != NULL) {
- DLOG(INFO) << "NetworkLocationRequest : Cancelling pending request";
+ DVLOG(1) << "NetworkLocationRequest : Cancelling pending request";
url_fetcher_.reset();
}
gateway_data_ = gateway_data;
@@ -134,8 +134,7 @@ void NetworkLocationRequest::OnURLFetchComplete(const URLFetcher* source,
url_fetcher_.reset();
DCHECK(listener_);
- DLOG(INFO) << "NetworkLocationRequest::Run() : "
- "Calling listener with position.\n";
+ DVLOG(1) << "NetworkLocationRequest::Run() : Calling listener with position.";
listener_->LocationResponseAvailable(position, server_error, access_token,
gateway_data_, radio_data_, wifi_data_);
}
@@ -176,8 +175,8 @@ void FormRequestBody(const std::string& host_name,
AddGatewayData(gateway_data, age, &body_object);
base::JSONWriter::Write(&body_object, false, data);
- DLOG(INFO) << "NetworkLocationRequest::FormRequestBody(): Formed body "
- << *data << ".\n";
+ DVLOG(1) << "NetworkLocationRequest::FormRequestBody(): Formed body " << *data
+ << ".";
}
void FormatPositionError(const GURL& server_url,
@@ -189,8 +188,8 @@ void FormatPositionError(const GURL& server_url,
position->error_message += "' : ";
position->error_message += message;
position->error_message += ".";
- LOG(INFO) << "NetworkLocationRequest::GetLocationFromResponse() : "
- << position->error_message;
+ VLOG(1) << "NetworkLocationRequest::GetLocationFromResponse() : "
+ << position->error_message;
}
void GetLocationFromResponse(bool http_post_result,
@@ -295,11 +294,10 @@ bool ParseServerResponse(const std::string& response_body,
DCHECK(!timestamp.is_null());
if (response_body.empty()) {
- LOG(WARNING) << "ParseServerResponse() : Response was empty.\n";
+ LOG(WARNING) << "ParseServerResponse() : Response was empty.";
return false;
}
- DLOG(INFO) << "ParseServerResponse() : Parsing response "
- << response_body << ".\n";
+ DVLOG(1) << "ParseServerResponse() : Parsing response " << response_body;
// Parse the response, ignoring comments.
std::string error_msg;
@@ -307,13 +305,13 @@ bool ParseServerResponse(const std::string& response_body,
response_body, false, NULL, &error_msg));
if (response_value == NULL) {
LOG(WARNING) << "ParseServerResponse() : JSONReader failed : "
- << error_msg << ".\n";
+ << error_msg;
return false;
}
if (!response_value->IsType(Value::TYPE_DICTIONARY)) {
- LOG(INFO) << "ParseServerResponse() : Unexpected resopnse type "
- << response_value->GetType() << ".\n";
+ VLOG(1) << "ParseServerResponse() : Unexpected resopnse type "
+ << response_value->GetType();
return false;
}
const DictionaryValue* response_object =
@@ -325,7 +323,7 @@ bool ParseServerResponse(const std::string& response_body,
// Get the location
Value* location_value = NULL;
if (!response_object->Get(kLocationString, &location_value)) {
- LOG(INFO) << "ParseServerResponse() : Missing location attribute.\n";
+ VLOG(1) << "ParseServerResponse() : Missing location attribute.";
// GLS returns a response with no location property to represent
// no fix available; return true to indicate successful parse.
return true;
@@ -334,8 +332,8 @@ bool ParseServerResponse(const std::string& response_body,
if (!location_value->IsType(Value::TYPE_DICTIONARY)) {
if (!location_value->IsType(Value::TYPE_NULL)) {
- LOG(INFO) << "ParseServerResponse() : Unexpected location type"
- << location_value->GetType() << ".\n";
+ VLOG(1) << "ParseServerResponse() : Unexpected location type "
+ << location_value->GetType();
// If the network provider was unable to provide a position fix, it should
// return a HTTP 200, with "location" : null. Otherwise it's an error.
return false;
@@ -349,7 +347,7 @@ bool ParseServerResponse(const std::string& response_body,
double latitude, longitude;
if (!GetAsDouble(*location_object, kLatitudeString, &latitude) ||
!GetAsDouble(*location_object, kLongitudeString, &longitude)) {
- LOG(INFO) << "ParseServerResponse() : location lacks lat and/or long.\n";
+ VLOG(1) << "ParseServerResponse() : location lacks lat and/or long.";
return false;
}
// All error paths covered: now start actually modifying postion.
diff --git a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm
index abefaa9..dc1f2c6 100644
--- a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm
+++ b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm
@@ -70,7 +70,7 @@ bool CoreWlanApi::Init() {
bundle_.reset([[NSBundle alloc]
initWithPath:@"/System/Library/Frameworks/CoreWLAN.framework"]);
if (!bundle_) {
- DLOG(INFO) << "Failed to load the CoreWLAN framework bundle";
+ DVLOG(1) << "Failed to load the CoreWLAN framework bundle";
return false;
}
@@ -79,8 +79,8 @@ bool CoreWlanApi::Init() {
void* dl_handle = dlopen([[bundle_ executablePath] fileSystemRepresentation],
RTLD_LAZY | RTLD_LOCAL);
if (dl_handle) {
- const NSString* key = *reinterpret_cast<const NSString**>(
- dlsym(dl_handle, "kCWScanKeyMerge"));
+ NSString* key = *reinterpret_cast<NSString**>(dlsym(dl_handle,
+ "kCWScanKeyMerge"));
if (key)
merge_key_.reset([key copy]);
}
@@ -130,7 +130,7 @@ bool CoreWlanApi::GetAccessPointData(WifiData::AccessPointDataSet* data) {
++interface_error_count;
continue;
}
- DLOG(INFO) << interface_name << ": found " << count << " wifi APs";
+ DVLOG(1) << interface_name << ": found " << count << " wifi APs";
for (CWNetwork* network in scan) {
DCHECK(network);
diff --git a/chrome/browser/geolocation/wifi_data_provider_linux.cc b/chrome/browser/geolocation/wifi_data_provider_linux.cc
index 621e235..6c043e0 100644
--- a/chrome/browser/geolocation/wifi_data_provider_linux.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_linux.cc
@@ -267,8 +267,8 @@ bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
if (CheckError())
return false;
- DLOG(INFO) << "Wireless adapter " << adapter_path << " found "
- << ap_list->len << " access points.";
+ DVLOG(1) << "Wireless adapter " << adapter_path << " found " << ap_list->len
+ << " access points.";
for (guint i = 0; i < ap_list->len; i++) {
const gchar* ap_path =
diff --git a/chrome/browser/geolocation/wifi_data_provider_mac.cc b/chrome/browser/geolocation/wifi_data_provider_mac.cc
index f99b45f..804f9a6 100644
--- a/chrome/browser/geolocation/wifi_data_provider_mac.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_mac.cc
@@ -63,7 +63,7 @@ Apple80211Api::~Apple80211Api() {
}
bool Apple80211Api::Init() {
- DLOG(INFO) << "Apple80211Api::Init";
+ DVLOG(1) << "Apple80211Api::Init";
apple_80211_library_ = dlopen(
"/System/Library/PrivateFrameworks/Apple80211.framework/Apple80211",
RTLD_LAZY);
@@ -98,7 +98,7 @@ bool Apple80211Api::Init() {
}
bool Apple80211Api::GetAccessPointData(WifiData::AccessPointDataSet* data) {
- DLOG(INFO) << "Apple80211Api::GetAccessPointData";
+ DVLOG(1) << "Apple80211Api::GetAccessPointData";
DCHECK(data);
DCHECK(WirelessScanSplit_function_);
CFArrayRef managed_access_points = NULL;
@@ -118,7 +118,7 @@ bool Apple80211Api::GetAccessPointData(WifiData::AccessPointDataSet* data) {
}
int num_access_points = CFArrayGetCount(managed_access_points);
- DLOG(INFO) << "Found " << num_access_points << " managed access points";
+ DVLOG(1) << "Found " << num_access_points << " managed access points";
for (int i = 0; i < num_access_points; ++i) {
const WirelessNetworkInfo* access_point_info =
reinterpret_cast<const WirelessNetworkInfo*>(
@@ -172,7 +172,7 @@ MacWifiDataProvider::WlanApiInterface* MacWifiDataProvider::NewWlanApi() {
if (wlan_api->Init())
return wlan_api.release();
- DLOG(INFO) << "MacWifiDataProvider : failed to initialize any wlan api";
+ DVLOG(1) << "MacWifiDataProvider : failed to initialize any wlan api";
return NULL;
}
diff --git a/chrome/browser/geolocation/wifi_data_provider_win.cc b/chrome/browser/geolocation/wifi_data_provider_win.cc
index 2dfb06b..2e3de75 100644
--- a/chrome/browser/geolocation/wifi_data_provider_win.cc
+++ b/chrome/browser/geolocation/wifi_data_provider_win.cc
@@ -267,10 +267,10 @@ bool WindowsWlanApi::GetAccessPointData(
// when it's in this state. http://crbug.com/39300
if (interface_list->InterfaceInfo[i].isState ==
wlan_interface_state_associating) {
- LOG(INFO) << "Skipping wifi scan on adapter " << i << " ("
- << interface_list->InterfaceInfo[i].strInterfaceDescription
- << ") in 'associating' state. Repeated occurrences indicates "
- << "a non-responding adapter.";
+ VLOG(1) << "Skipping wifi scan on adapter " << i << " ("
+ << interface_list->InterfaceInfo[i].strInterfaceDescription
+ << ") in 'associating' state. Repeated occurrences indicates a "
+ "non-responding adapter.";
continue;
}
GetInterfaceDataWLAN(wlan_handle,