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

Side by Side Diff: components/browsing_data/browsing_data_utils.h

Issue 2084903002: Moved BrowsingDataCounter and part of BrowsingDataCounterUtils to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed deps Created 4 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_BROWSING_DATA_BROWSING_DATA_UTILS_H_
6 #define COMPONENTS_BROWSING_DATA_BROWSING_DATA_UTILS_H_
7
8 #include "base/strings/string16.h"
9 #include "base/time/time.h"
10
11 struct TimeRange {
12 TimeRange(base::Time begin, base::Time end) : begin(begin), end(end) {}
13
14 base::Time begin;
15 base::Time end;
16 };
17
18 // Browsing data types as seen in the Android UI.
19 // TODO(msramek): Reuse this enum as the canonical representation of the
20 // user-facing browsing data types in the Desktop UI as well.
21 //
22 // A Java counterpart will be generated for this enum.
23 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
24 enum BrowsingDataType {
25 HISTORY,
26 CACHE,
27 COOKIES,
28 PASSWORDS,
29 FORM_DATA,
30 BOOKMARKS,
31 NUM_TYPES
32 };
33
34 // Time period ranges available when doing browsing data removals.
35 //
36 // A Java counterpart will be generated for this enum.
37 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
38 enum TimePeriod {
39 LAST_HOUR = 0,
40 LAST_DAY,
41 LAST_WEEK,
42 FOUR_WEEKS,
43 EVERYTHING,
44 TIME_PERIOD_LAST = EVERYTHING
45 };
46
47 TimeRange Period(TimePeriod period);
48
49 TimeRange Unbounded();
50
51 // Calculate the begin time for the deletion range specified by |time_period|.
52 base::Time CalculateBeginDeleteTime(TimePeriod time_period);
53
54 #endif // COMPONENTS_BROWSING_DATA_BROWSING_DATA_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698