Convert LOG(INFO) to VLOG(1) - chrome/browser/safe_browsing/.

This also converts SB_DLOG() to DVLOG(), since VLOG() is configurable on a per-module basis.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4004001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63754 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/safe_browsing/bloom_filter_unittest.cc b/chrome/browser/safe_browsing/bloom_filter_unittest.cc
index df44235..1268e021 100644
--- a/chrome/browser/safe_browsing/bloom_filter_unittest.cc
+++ b/chrome/browser/safe_browsing/bloom_filter_unittest.cc
@@ -74,8 +74,8 @@
   double fp_rate = found_count * 100.0 / count;
   CHECK(fp_rate < 5.0);
 
-  SB_DLOG(INFO) << "For safe browsing bloom filter of size " << count <<
-      ", the FP rate was " << fp_rate << " %";
+  VLOG(1) << "For safe browsing bloom filter of size " << count
+          << ", the FP rate was " << fp_rate << " %";
 }
 
 // Test that we can read and write the bloom filter file.
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index d7ba1a89..ab8ad5c 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -207,11 +207,11 @@
     } else {
       HandleGetHashError(Time::Now());
       if (status.status() == URLRequestStatus::FAILED) {
-          SB_DLOG(INFO) << "SafeBrowsing GetHash request for: " << source->url()
-                        << " failed with os error: " << status.os_error();
+          VLOG(1) << "SafeBrowsing GetHash request for: " << source->url()
+                  << " failed with os error: " << status.os_error();
       } else {
-          SB_DLOG(INFO) << "SafeBrowsing GetHash request for: " << source->url()
-                        << " failed with error: " << response_code;
+          VLOG(1) << "SafeBrowsing GetHash request for: " << source->url()
+                  << " failed with error: " << response_code;
       }
     }
 
@@ -242,8 +242,8 @@
                                         data.data(),
                                         static_cast<int>(data.length()));
       if (!parsed_ok) {
-        SB_DLOG(INFO) << "SafeBrowsing request for: " << source->url()
-                      << "failed parse.";
+        VLOG(1) << "SafeBrowsing request for: " << source->url()
+                << " failed parse.";
         must_back_off = true;
         chunk_request_urls_.clear();
         UpdateFinished(false);
@@ -281,11 +281,11 @@
         chunk_request_urls_.clear();
       UpdateFinished(false);
       if (status.status() == URLRequestStatus::FAILED) {
-        SB_DLOG(INFO) << "SafeBrowsing request for: " << source->url()
-                      << " failed with os error: " << status.os_error();
+        VLOG(1) << "SafeBrowsing request for: " << source->url()
+                << " failed with os error: " << status.os_error();
       } else {
-        SB_DLOG(INFO) << "SafeBrowsing request for: " << source->url()
-                      << " failed with error: " << response_code;
+        VLOG(1) << "SafeBrowsing request for: " << source->url()
+                << " failed with error: " << response_code;
       }
     }
   }
@@ -376,12 +376,12 @@
         data_str.assign(data, length);
         std::string encoded_chunk;
         base::Base64Encode(data, &encoded_chunk);
-        SB_DLOG(INFO) << "ParseChunk error for chunk: " << chunk_url.url
-                      << ", client_key: " << client_key_
-                      << ", wrapped_key: " << wrapped_key_
-                      << ", mac: " << chunk_url.mac
-                      << ", Base64Encode(data): " << encoded_chunk
-                      << ", length: " << length;
+        VLOG(1) << "ParseChunk error for chunk: " << chunk_url.url
+                << ", client_key: " << client_key_
+                << ", wrapped_key: " << wrapped_key_
+                << ", mac: " << chunk_url.mac
+                << ", Base64Encode(data): " << encoded_chunk
+                << ", length: " << length;
 #endif
         return false;
       }
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index 36f9a74..7290376 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -285,7 +285,7 @@
     const int chunk_number = atoi(cmd_parts[1].c_str());
     const int hash_len = atoi(cmd_parts[2].c_str());
     if (hash_len != sizeof(SBPrefix) && hash_len != sizeof(SBFullHash)) {
-      SB_DLOG(INFO) << "ParseChunk got unknown hashlen " << hash_len;
+      VLOG(1) << "ParseChunk got unknown hashlen " << hash_len;
       return false;
     }
 
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index 823362f..824152e8 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -609,9 +609,9 @@
                          static_cast<int>(io_after.WriteOperationCount -
                                           io_before.WriteOperationCount));
   }
-  SB_DLOG(INFO) << "SafeBrowsingDatabaseImpl built bloom filter in "
-                << bloom_gen.InMilliseconds()
-                << " ms total.  prefix count: "<< add_prefixes.size();
+  VLOG(1) << "SafeBrowsingDatabaseImpl built bloom filter in "
+          << bloom_gen.InMilliseconds() << " ms total.  prefix count: "
+          << add_prefixes.size();
   UMA_HISTOGRAM_LONG_TIMES("SB2.BuildFilter", bloom_gen);
   UMA_HISTOGRAM_COUNTS("SB2.FilterKilobytes", bloom_filter_->size() / 1024);
   int64 size_64;
@@ -663,8 +663,8 @@
 
   const base::TimeTicks before = base::TimeTicks::Now();
   bloom_filter_ = BloomFilter::LoadFile(bloom_filter_filename_);
-  SB_DLOG(INFO) << "SafeBrowsingDatabaseNew read bloom filter in "
-                << (base::TimeTicks::Now() - before).InMilliseconds() << " ms";
+  VLOG(1) << "SafeBrowsingDatabaseNew read bloom filter in "
+          << (base::TimeTicks::Now() - before).InMilliseconds() << " ms";
 
   if (!bloom_filter_.get()) {
     UMA_HISTOGRAM_COUNTS("SB2.FilterReadFail", 1);
@@ -692,8 +692,8 @@
 
   const base::TimeTicks before = base::TimeTicks::Now();
   const bool write_ok = bloom_filter_->WriteFile(bloom_filter_filename_);
-  SB_DLOG(INFO) << "SafeBrowsingDatabaseNew wrote bloom filter in " <<
-      (base::TimeTicks::Now() - before).InMilliseconds() << " ms";
+  VLOG(1) << "SafeBrowsingDatabaseNew wrote bloom filter in "
+          << (base::TimeTicks::Now() - before).InMilliseconds() << " ms";
 
   if (!write_ok) {
     UMA_HISTOGRAM_COUNTS("SB2.FilterWriteFail", 1);
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 0095efb..2713814 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -1051,14 +1051,14 @@
 
     // Start an update.  The insert will fail due to corruption.
     EXPECT_TRUE(database_->UpdateStarted(&lists));
-    LOG(INFO) << "Expect failed check on: sqlite error 11";
+    VLOG(1) << "Expect failed check on: sqlite error 11";
     database_->InsertChunks(safe_browsing_util::kMalwareList, chunks);
 
     // Database file still exists until the corruption handler has run.
     EXPECT_TRUE(file_util::PathExists(database_filename_));
 
     // Flush through the corruption-handler task.
-    LOG(INFO) << "Expect failed check on: SafeBrowsing database reset";
+    VLOG(1) << "Expect failed check on: SafeBrowsing database reset";
     MessageLoop::current()->RunAllPending();
   }
 
@@ -1143,7 +1143,7 @@
     EXPECT_TRUE(file_util::PathExists(database_filename_));
 
     // Flush through the corruption-handler task.
-    LOG(INFO) << "Expect failed check on: SafeBrowsing database reset";
+    VLOG(1) << "Expect failed check on: SafeBrowsing database reset";
     MessageLoop::current()->RunAllPending();
   }
 
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 24f458c..d3dcce7 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -1,7 +1,6 @@
 // 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/browser/safe_browsing/safe_browsing_service.h"
 
@@ -635,7 +634,7 @@
     return URL_MALWARE;
   }
 
-  SB_DLOG(INFO) << "Unknown safe browsing list " << list_name;
+  DVLOG(1) << "Unknown safe browsing list " << list_name;
   return URL_SAFE;
 }
 
@@ -824,9 +823,9 @@
   if (!enabled_)
     return;
 
-  DLOG(INFO) << "ReportSafeBrowsingHit: " << malicious_url << " " << page_url
-             << " " << referrer_url << " " << is_subresource
-             << " " << threat_type;
+  DVLOG(1) << "ReportSafeBrowsingHit: " << malicious_url << " " << page_url
+           << " " << referrer_url << " " << is_subresource << " "
+           << threat_type;
   protocol_manager_->ReportSafeBrowsingHit(malicious_url, page_url,
                                            referrer_url, is_subresource,
                                            threat_type);
diff --git a/chrome/browser/safe_browsing/safe_browsing_util.h b/chrome/browser/safe_browsing/safe_browsing_util.h
index f147fe4..a4fd2b6f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_util.h
+++ b/chrome/browser/safe_browsing/safe_browsing_util.h
@@ -18,12 +18,6 @@
 
 class GURL;
 
-#ifdef SB_LOGGING_ENABLED
-#define SB_DLOG(severity) DLOG_IF(INFO, 1)
-#else
-#define SB_DLOG(severity) DLOG_IF(INFO, 0)
-#endif
-
 class SBEntry;
 
 // A truncated hash's type.