diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 05:47:15 +0000 |
commit | c870c76357fc05d3f7181f8121181f983bd25e7f (patch) | |
tree | 4757d379e295e2a594e63d53a0d3b4fe51c77379 /chrome/browser/safe_browsing/safe_browsing_service.cc | |
parent | 0b88baec73430cb25a4d6181b47c221f99fe5d0f (diff) | |
download | chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.zip chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.gz chromium_src-c870c76357fc05d3f7181f8121181f983bd25e7f.tar.bz2 |
Safe browsing cleanup:
* wstring -> FilePath
* create versions of WriteFile/ReadFile with FilePath signatures
Review URL: http://codereview.chromium.org/19610
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing/safe_browsing_service.cc')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index ba6701e..57d4697 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -55,10 +55,11 @@ void SafeBrowsingService::Initialize(MessageLoop* io_loop) { io_loop_ = io_loop; // Get the profile's preference for SafeBrowsing. - std::wstring user_data_dir; + FilePath user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); ProfileManager* profile_manager = g_browser_process->profile_manager(); - Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); + Profile* profile = profile_manager->GetDefaultProfile( + user_data_dir.ToWStringHack()); PrefService* pref_service = profile->GetPrefs(); if (pref_service->GetBoolean(prefs::kSafeBrowsingEnabled)) Start(); @@ -394,12 +395,10 @@ SafeBrowsingDatabase* SafeBrowsingService::GetDatabase() { if (database_) return database_; - std::wstring path; + FilePath path; bool result = PathService::Get(chrome::DIR_USER_DATA, &path); DCHECK(result); - - path.append(L"\\"); - path.append(chrome::kSafeBrowsingFilename); + path = path.Append(chrome::kSafeBrowsingFilename); Time before = Time::Now(); SafeBrowsingDatabase* database = SafeBrowsingDatabase::Create(); |