| Index: chrome/browser/browsing_data_remover.cc
|
| ===================================================================
|
| --- chrome/browser/browsing_data_remover.cc (revision 16645)
|
| +++ chrome/browser/browsing_data_remover.cc (working copy)
|
| @@ -41,7 +41,6 @@
|
| : profile_(profile),
|
| delete_begin_(delete_begin),
|
| delete_end_(delete_end),
|
| - waiting_for_keywords_(false),
|
| waiting_for_clear_history_(false),
|
| waiting_for_clear_cache_(false) {
|
| DCHECK(profile);
|
| @@ -69,10 +68,8 @@
|
| // As part of history deletion we also delete the auto-generated keywords.
|
| TemplateURLModel* keywords_model = profile_->GetTemplateURLModel();
|
| if (keywords_model && !keywords_model->loaded()) {
|
| - waiting_for_keywords_ = true;
|
| - NotificationService::current()->AddObserver(
|
| - this, NotificationType::TEMPLATE_URL_MODEL_LOADED,
|
| - Source<TemplateURLModel>(keywords_model));
|
| + registrar_.Add(this, NotificationType::TEMPLATE_URL_MODEL_LOADED,
|
| + Source<TemplateURLModel>(keywords_model));
|
| keywords_model->Load();
|
| } else if (keywords_model) {
|
| keywords_model->RemoveAutoGeneratedBetween(delete_begin_, delete_end_);
|
| @@ -163,15 +160,8 @@
|
| DCHECK(type == NotificationType::TEMPLATE_URL_MODEL_LOADED);
|
| TemplateURLModel* model = Source<TemplateURLModel>(source).ptr();
|
| if (model->profile() == profile_->GetOriginalProfile()) {
|
| - NotificationService::current()->RemoveObserver(
|
| - this,
|
| - NotificationType::TEMPLATE_URL_MODEL_LOADED,
|
| - Source<TemplateURLModel>(model));
|
| -
|
| + registrar_.RemoveAll();
|
| model->RemoveAutoGeneratedBetween(delete_begin_, delete_end_);
|
| -
|
| - waiting_for_keywords_ = false;
|
| -
|
| NotifyAndDeleteIfDone();
|
| }
|
| }
|
|
|