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

Unified Diff: chrome/browser/profile.cc

Issue 337025: Design changes in browser/privacy_blacklist needed to integrate (Closed)
Patch Set: fixes Created 11 years, 2 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 | « chrome/browser/profile.h ('k') | chrome/browser/views/blacklist_error_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 82c4d268982137c2a1e8b24758ec7a9ff9a1fd36..ac9f01a5108dcc2ff083818e5e0fa2eeb9b3ca62 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -29,7 +29,7 @@
#include "chrome/browser/net/ssl_config_service_manager.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/password_manager/password_store_default.h"
-#include "chrome/browser/privacy_blacklist/blacklist.h"
+#include "chrome/browser/privacy_blacklist/blacklist_io.h"
#include "chrome/browser/profile_manager.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/search_engines/template_url_fetcher.h"
@@ -594,7 +594,9 @@ ProfileImpl::ProfileImpl(const FilePath& path)
#else
FilePath path(option);
#endif
- blacklist_ = new Blacklist(path);
+ blacklist_.reset(new Blacklist);
+ // TODO(phajdan.jr): Handle errors when reading blacklist.
+ BlacklistIO::ReadBinary(blacklist_.get(), path);
}
#if defined(OS_MACOSX)
@@ -757,8 +759,7 @@ ProfileImpl::~ProfileImpl() {
CleanupRequestContext(extensions_request_context_);
// When the request contexts are gone, the blacklist wont be needed anymore.
- delete blacklist_;
- blacklist_ = 0;
+ blacklist_.reset();
// HistoryService may call into the BookmarkModel, as such we need to
// delete HistoryService before the BookmarkModel. The destructor for
@@ -970,7 +971,7 @@ net::SSLConfigService* ProfileImpl::GetSSLConfigService() {
}
Blacklist* ProfileImpl::GetBlacklist() {
- return blacklist_;
+ return blacklist_.get();
}
HistoryService* ProfileImpl::GetHistoryService(ServiceAccessType sat) {
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/views/blacklist_error_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698