summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 16:17:20 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 16:17:20 +0000
commitc84741368416b492169d2f94ac39cdc3d5400f91 (patch)
tree29545a711db0a0ed55b31e1e10622a66c2db4cd9 /chrome/browser/safe_browsing
parent96fcbf2ddb381eb3b330a41875c2f97b87323966 (diff)
downloadchromium_src-c84741368416b492169d2f94ac39cdc3d5400f91.zip
chromium_src-c84741368416b492169d2f94ac39cdc3d5400f91.tar.gz
chromium_src-c84741368416b492169d2f94ac39cdc3d5400f91.tar.bz2
Fix the Windows build.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/filter_false_positive_perftest.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/safe_browsing/filter_false_positive_perftest.cc b/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
index fd58ea5..6ce33330 100644
--- a/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
+++ b/chrome/browser/safe_browsing/filter_false_positive_perftest.cc
@@ -63,6 +63,7 @@
#include "base/rand_util.h"
#include "base/scoped_ptr.h"
#include "base/sha2.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/bloom_filter.h"
@@ -260,7 +261,7 @@ void CalculateBloomFilterFalsePositives(
if (use_weights) {
std::string::size_type pos = url.find_last_of(",");
if (pos != std::string::npos) {
- weight = StringToInt(std::string(url, pos + 1));
+ base::StringToInt(std::string(url, pos + 1), &weight);
url = url.substr(0, pos);
}
}
@@ -314,14 +315,16 @@ TEST(SafeBrowsingBloomFilter, FalsePositives) {
int start = BloomFilter::kBloomFilterSizeRatio;
if (CommandLine::ForCurrentProcess()->HasSwitch(kFilterStart)) {
- start = StringToInt(
- CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterStart));
+ base::StringToInt(
+ CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterStart),
+ &start);
}
int steps = 1;
if (CommandLine::ForCurrentProcess()->HasSwitch(kFilterSteps)) {
- steps = StringToInt(
- CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterSteps));
+ base::StringToInt(
+ CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterSteps),
+ &steps);
}
int stop = start + steps;
@@ -340,8 +343,9 @@ TEST(SafeBrowsingBloomFilter, HashTime) {
int num_checks = kNumHashChecks;
if (CommandLine::ForCurrentProcess()->HasSwitch(kFilterNumChecks)) {
- num_checks = StringToInt(
- CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterNumChecks));
+ base::StringToInt(
+ CommandLine::ForCurrentProcess()->GetSwitchValue(kFilterNumChecks),
+ &num_checks);
}
// Populate the bloom filter and measure the time.