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

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

Issue 7685009: Revert "Modifying prefetch to account for multi-profile." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_remover.h" 5 #include "chrome/browser/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/platform_file.h" 13 #include "base/platform_file.h"
14 #include "chrome/browser/autofill/personal_data_manager.h" 14 #include "chrome/browser/autofill/personal_data_manager.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/extension_special_storage_policy.h" 17 #include "chrome/browser/extensions/extension_special_storage_policy.h"
18 #include "chrome/browser/history/history.h" 18 #include "chrome/browser/history/history.h"
19 #include "chrome/browser/io_thread.h" 19 #include "chrome/browser/io_thread.h"
20 #include "chrome/browser/net/chrome_net_log.h" 20 #include "chrome/browser/net/chrome_net_log.h"
21 #include "chrome/browser/net/chrome_url_request_context.h" 21 #include "chrome/browser/net/chrome_url_request_context.h"
22 #include "chrome/browser/net/predictor.h"
23 #include "chrome/browser/password_manager/password_store.h" 22 #include "chrome/browser/password_manager/password_store.h"
24 #include "chrome/browser/plugin_data_remover.h" 23 #include "chrome/browser/plugin_data_remover.h"
25 #include "chrome/browser/prerender/prerender_manager.h" 24 #include "chrome/browser/prerender/prerender_manager.h"
26 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/renderer_host/web_cache_manager.h" 26 #include "chrome/browser/renderer_host/web_cache_manager.h"
28 #include "chrome/browser/search_engines/template_url_service.h" 27 #include "chrome/browser/search_engines/template_url_service.h"
29 #include "chrome/browser/search_engines/template_url_service_factory.h" 28 #include "chrome/browser/search_engines/template_url_service_factory.h"
30 #include "chrome/browser/sessions/session_service.h" 29 #include "chrome/browser/sessions/session_service.h"
31 #include "chrome/browser/sessions/session_service_factory.h" 30 #include "chrome/browser/sessions/session_service_factory.h"
32 #include "chrome/browser/sessions/tab_restore_service.h" 31 #include "chrome/browser/sessions/tab_restore_service.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void BrowsingDataRemover::ClearedNetworkHistory() { 358 void BrowsingDataRemover::ClearedNetworkHistory() {
360 waiting_for_clear_networking_history_ = false; 359 waiting_for_clear_networking_history_ = false;
361 360
362 NotifyAndDeleteIfDone(); 361 NotifyAndDeleteIfDone();
363 } 362 }
364 363
365 void BrowsingDataRemover::ClearNetworkingHistory(IOThread* io_thread) { 364 void BrowsingDataRemover::ClearNetworkingHistory(IOThread* io_thread) {
366 // This function should be called on the IO thread. 365 // This function should be called on the IO thread.
367 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 366 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
368 367
369 io_thread->ClearHostCache(); 368 io_thread->ClearNetworkingHistory();
370
371 chrome_browser_net::Predictor* predictor = profile_->GetNetworkPredictor();
372 if (predictor) {
373 predictor->DiscardInitialNavigationHistory();
374 predictor->DiscardAllResults();
375 }
376 369
377 // Notify the UI thread that we are done. 370 // Notify the UI thread that we are done.
378 BrowserThread::PostTask( 371 BrowserThread::PostTask(
379 BrowserThread::UI, FROM_HERE, 372 BrowserThread::UI, FROM_HERE,
380 NewRunnableMethod(this, &BrowsingDataRemover::ClearedNetworkHistory)); 373 NewRunnableMethod(this, &BrowsingDataRemover::ClearedNetworkHistory));
381 } 374 }
382 375
383 void BrowsingDataRemover::ClearedCache() { 376 void BrowsingDataRemover::ClearedCache() {
384 waiting_for_clear_cache_ = false; 377 waiting_for_clear_cache_ = false;
385 378
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 NewRunnableMethod( 525 NewRunnableMethod(
533 this, 526 this,
534 &BrowsingDataRemover::NotifyAndDeleteIfDone)); 527 &BrowsingDataRemover::NotifyAndDeleteIfDone));
535 } 528 }
536 529
537 void BrowsingDataRemover::OnWaitableEventSignaled( 530 void BrowsingDataRemover::OnWaitableEventSignaled(
538 base::WaitableEvent* waitable_event) { 531 base::WaitableEvent* waitable_event) {
539 waiting_for_clear_lso_data_ = false; 532 waiting_for_clear_lso_data_ = false;
540 NotifyAndDeleteIfDone(); 533 NotifyAndDeleteIfDone();
541 } 534 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698