Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7049)

Unified Diff: chrome/browser/safe_browsing/database_perftest.cc

Issue 19610: Safe browsing cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/database_perftest.cc
===================================================================
--- chrome/browser/safe_browsing/database_perftest.cc (revision 8772)
+++ chrome/browser/safe_browsing/database_perftest.cc (working copy)
@@ -389,10 +389,9 @@
logging::LOCK_LOG_FILE,
logging::DELETE_OLD_LOG_FILE);
- std::wstring tmp_path;
+ FilePath tmp_path;
PathService::Get(base::DIR_TEMP, &tmp_path);
- path_ = FilePath::FromWStringHack(tmp_path);
- path_ = path_.Append(filename);
+ path_ = tmp_path.Append(filename);
}
void Create(int size) {
@@ -400,7 +399,7 @@
scoped_ptr<SafeBrowsingDatabase> database(SafeBrowsingDatabase::Create());
database->SetSynchronous();
- EXPECT_TRUE(database->Init(path_.ToWStringHack(), NULL));
+ EXPECT_TRUE(database->Init(path_, NULL));
int chunk_id = 0;
int total_host_keys = size;
@@ -433,7 +432,7 @@
scoped_ptr<SafeBrowsingDatabase> database(SafeBrowsingDatabase::Create());
database->SetSynchronous();
- EXPECT_TRUE(database->Init(path_.ToWStringHack(), NULL));
+ EXPECT_TRUE(database->Init(path_, NULL));
PerfTimer total_timer;
int64 db_ms = 0;
@@ -475,14 +474,13 @@
void BuildBloomFilter() {
file_util::EvictFileFromSystemCache(path_);
- file_util::Delete(SafeBrowsingDatabase::BloomFilterFilename(
- path_.ToWStringHack()), false);
+ file_util::Delete(SafeBrowsingDatabase::BloomFilterFilename(path_), false);
PerfTimer total_timer;
scoped_ptr<SafeBrowsingDatabase> database(SafeBrowsingDatabase::Create());
database->SetSynchronous();
- EXPECT_TRUE(database->Init(path_.ToWStringHack(), NULL));
+ EXPECT_TRUE(database->Init(path_, NULL));
int64 total_ms = total_timer.Elapsed().InMilliseconds();
« no previous file with comments | « base/file_util_win.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698