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

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

Issue 24649002: Clean up a few more unused globals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thestig comment Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/history/expire_history_backend.h" 5 #include "chrome/browser/history/expire_history_backend.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <limits> 9 #include <limits>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // last expiration found at least kNumExpirePerIteration and we want to check 129 // last expiration found at least kNumExpirePerIteration and we want to check
130 // again "soon." 130 // again "soon."
131 const int kExpirationDelaySec = 30; 131 const int kExpirationDelaySec = 30;
132 132
133 // The number of minutes between checking, as with kExpirationDelaySec, but 133 // The number of minutes between checking, as with kExpirationDelaySec, but
134 // when we didn't find enough things to expire last time. If there was no 134 // when we didn't find enough things to expire last time. If there was no
135 // history to expire last iteration, it's likely there is nothing next 135 // history to expire last iteration, it's likely there is nothing next
136 // iteration, so we want to wait longer before checking to avoid wasting CPU. 136 // iteration, so we want to wait longer before checking to avoid wasting CPU.
137 const int kExpirationEmptyDelayMin = 5; 137 const int kExpirationEmptyDelayMin = 5;
138 138
139 // The number of minutes that we wait for before scheduling a task to
140 // delete old history index files.
141 const int kIndexExpirationDelayMin = 2;
142
143 // The number of the most recent months for which we do not want to delete
144 // the history index files.
145 const int kStoreHistoryIndexesForMonths = 3;
146
147 } // namespace 139 } // namespace
148 140
149 struct ExpireHistoryBackend::DeleteDependencies { 141 struct ExpireHistoryBackend::DeleteDependencies {
150 // The time range affected. These can be is_null() to be unbounded in one 142 // The time range affected. These can be is_null() to be unbounded in one
151 // or both directions. 143 // or both directions.
152 base::Time begin_time, end_time; 144 base::Time begin_time, end_time;
153 145
154 // ----- Filled by DeleteVisitRelatedInfo or manually if a function doesn't 146 // ----- Filled by DeleteVisitRelatedInfo or manually if a function doesn't
155 // call that function. ----- 147 // call that function. -----
156 148
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 // We use the bookmark service to determine if a URL is bookmarked. The 678 // We use the bookmark service to determine if a URL is bookmarked. The
687 // bookmark service is loaded on a separate thread and may not be done by the 679 // bookmark service is loaded on a separate thread and may not be done by the
688 // time we get here. We therefor block until the bookmarks have finished 680 // time we get here. We therefor block until the bookmarks have finished
689 // loading. 681 // loading.
690 if (bookmark_service_) 682 if (bookmark_service_)
691 bookmark_service_->BlockTillLoaded(); 683 bookmark_service_->BlockTillLoaded();
692 return bookmark_service_; 684 return bookmark_service_;
693 } 685 }
694 686
695 } // namespace history 687 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698