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

Side by Side Diff: chrome/browser/history/history_backend.cc

Issue 8910024: Add ExpireHistoryBackend::DeleteURLs method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years 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
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/history/history_backend.h" 5 #include "chrome/browser/history/history_backend.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 db_task_requests_.clear(); 1987 db_task_requests_.clear();
1988 } 1988 }
1989 1989
1990 //////////////////////////////////////////////////////////////////////////////// 1990 ////////////////////////////////////////////////////////////////////////////////
1991 // 1991 //
1992 // Generic operations 1992 // Generic operations
1993 // 1993 //
1994 //////////////////////////////////////////////////////////////////////////////// 1994 ////////////////////////////////////////////////////////////////////////////////
1995 1995
1996 void HistoryBackend::DeleteURLs(const std::vector<GURL>& urls) { 1996 void HistoryBackend::DeleteURLs(const std::vector<GURL>& urls) {
1997 for (std::vector<GURL>::const_iterator url = urls.begin(); url != urls.end(); 1997 expirer_.DeleteURLs(urls);
1998 ++url) {
1999 expirer_.DeleteURL(*url);
2000 }
2001 1998
2002 db_->GetStartDate(&first_recorded_time_); 1999 db_->GetStartDate(&first_recorded_time_);
2003 // Force a commit, if the user is deleting something for privacy reasons, we 2000 // Force a commit, if the user is deleting something for privacy reasons, we
2004 // want to get it on disk ASAP. 2001 // want to get it on disk ASAP.
2005 Commit(); 2002 Commit();
2006 } 2003 }
2007 2004
2008 void HistoryBackend::DeleteURL(const GURL& url) { 2005 void HistoryBackend::DeleteURL(const GURL& url) {
2009 expirer_.DeleteURL(url); 2006 expirer_.DeleteURL(url);
2010 2007
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 break; 2311 break;
2315 } 2312 }
2316 } 2313 }
2317 } 2314 }
2318 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name 2315 UMA_HISTOGRAM_TIMES("History.GetFavIconFromDB", // historical name
2319 TimeTicks::Now() - beginning_time); 2316 TimeTicks::Now() - beginning_time);
2320 return success; 2317 return success;
2321 } 2318 }
2322 2319
2323 } // namespace history 2320 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698