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

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

Issue 12489: Remove file_util::kPathSeparator from posix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_database_unittest.cc (revision 6039)
+++ chrome/browser/safe_browsing/safe_browsing_database_unittest.cc (working copy)
@@ -5,6 +5,7 @@
// Unit tests for the SafeBrowsing storage system.
#include "base/command_line.h"
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
@@ -21,7 +22,6 @@
using base::Time;
-static const wchar_t kSafeBrowsingTestDatabase[] = L"SafeBrowsingTestDatabase";
static const wchar_t kBloomSuffix[] = L" Bloom";
namespace {
@@ -59,11 +59,10 @@
// Common database test set up code.
std::wstring GetTestDatabaseName() {
- std::wstring filename;
+ FilePath filename;
PathService::Get(base::DIR_TEMP, &filename);
- filename.push_back(file_util::kPathSeparator);
- filename.append(kSafeBrowsingTestDatabase);
- return filename;
+ filename = filename.Append(FILE_PATH_LITERAL("SafeBrowsingTestDatabase"));
+ return filename.ToWStringHack();
}
SafeBrowsingDatabase* SetupTestDatabase() {
@@ -1042,10 +1041,11 @@
IoCounters before, after;
#endif
- std::wstring filename;
- PathService::Get(base::DIR_TEMP, &filename);
- filename.push_back(file_util::kPathSeparator);
- filename.append(L"SafeBrowsingTestDatabase");
+ FilePath path;
+ PathService::Get(base::DIR_TEMP, &path);
+ path = path.Append(FILE_PATH_LITERAL("SafeBrowsingTestDatabase"));
+ std::wstring filename = path.ToWStringHack();
+
// In case it existed from a previous run.
file_util::Delete(filename, false);
« no previous file with comments | « base/file_util_win.cc ('k') | net/url_request/url_request_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698