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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 2085643002: Don't clear the net predictors prefs on startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chrome_net_benchmarking_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 } 476 }
477 if (profile_->GetNetworkPredictor()) { 477 if (profile_->GetNetworkPredictor()) {
478 // TODO(dmurph): Support all backends with filter (crbug.com/113621). 478 // TODO(dmurph): Support all backends with filter (crbug.com/113621).
479 waiting_for_clear_network_predictor_ = true; 479 waiting_for_clear_network_predictor_ = true;
480 BrowserThread::PostTaskAndReply( 480 BrowserThread::PostTaskAndReply(
481 BrowserThread::IO, FROM_HERE, 481 BrowserThread::IO, FROM_HERE,
482 base::Bind(&ClearNetworkPredictorOnIOThread, 482 base::Bind(&ClearNetworkPredictorOnIOThread,
483 profile_->GetNetworkPredictor()), 483 profile_->GetNetworkPredictor()),
484 base::Bind(&BrowsingDataRemover::OnClearedNetworkPredictor, 484 base::Bind(&BrowsingDataRemover::OnClearedNetworkPredictor,
485 weak_ptr_factory_.GetWeakPtr())); 485 weak_ptr_factory_.GetWeakPtr()));
486 profile_->GetNetworkPredictor()->ClearPrefsOnUIThread();
486 } 487 }
487 488
488 // As part of history deletion we also delete the auto-generated keywords. 489 // As part of history deletion we also delete the auto-generated keywords.
489 TemplateURLService* keywords_model = 490 TemplateURLService* keywords_model =
490 TemplateURLServiceFactory::GetForProfile(profile_); 491 TemplateURLServiceFactory::GetForProfile(profile_);
491 492
492 if (keywords_model && !keywords_model->loaded()) { 493 if (keywords_model && !keywords_model->loaded()) {
493 template_url_sub_ = keywords_model->RegisterOnLoadedCallback( 494 template_url_sub_ = keywords_model->RegisterOnLoadedCallback(
494 base::Bind(&BrowsingDataRemover::OnKeywordsLoaded, 495 base::Bind(&BrowsingDataRemover::OnKeywordsLoaded,
495 weak_ptr_factory_.GetWeakPtr())); 496 weak_ptr_factory_.GetWeakPtr()));
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 waiting_for_clear_domain_reliability_monitor_ = false; 1337 waiting_for_clear_domain_reliability_monitor_ = false;
1337 NotifyIfDone(); 1338 NotifyIfDone();
1338 } 1339 }
1339 1340
1340 // static 1341 // static
1341 BrowsingDataRemover::CallbackSubscription 1342 BrowsingDataRemover::CallbackSubscription
1342 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( 1343 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback(
1343 const BrowsingDataRemover::Callback& callback) { 1344 const BrowsingDataRemover::Callback& callback) {
1344 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); 1345 return GetOnBrowsingDataRemovedCallbacks()->Add(callback);
1345 } 1346 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_net_benchmarking_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698