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

Side by Side Diff: chrome/browser/history/visitsegment_database.h

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__ 5 #ifndef CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__
6 #define CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__ 6 #define CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/history/history_types.h" 9 #include "chrome/browser/history/history_types.h"
10 10
(...skipping 27 matching lines...) Expand all
38 // Return the ID of the URL currently used to represent this segment or 0 if 38 // Return the ID of the URL currently used to represent this segment or 0 if
39 // an error occured. 39 // an error occured.
40 URLID GetSegmentRepresentationURL(SegmentID segment_id); 40 URLID GetSegmentRepresentationURL(SegmentID segment_id);
41 41
42 // Create a segment for the provided URL ID with the given name. Returns the 42 // Create a segment for the provided URL ID with the given name. Returns the
43 // ID of the newly created segment, or 0 on failure. 43 // ID of the newly created segment, or 0 on failure.
44 SegmentID CreateSegment(URLID url_id, const std::string& segment_name); 44 SegmentID CreateSegment(URLID url_id, const std::string& segment_name);
45 45
46 // Increase the segment visit count by the provided amount. Return true on 46 // Increase the segment visit count by the provided amount. Return true on
47 // success. 47 // success.
48 bool IncreaseSegmentVisitCount(SegmentID segment_id, const Time& ts, 48 bool IncreaseSegmentVisitCount(SegmentID segment_id, const base::Time& ts,
49 int amount); 49 int amount);
50 50
51 // Compute the segment usage since |from_time| using the provided aggregator. 51 // Compute the segment usage since |from_time| using the provided aggregator.
52 // A PageUsageData is added in |result| for the nine highest-scored segments. 52 // A PageUsageData is added in |result| for the nine highest-scored segments.
53 void QuerySegmentUsage(const Time& from_time, 53 void QuerySegmentUsage(const base::Time& from_time,
54 std::vector<PageUsageData*>* result); 54 std::vector<PageUsageData*>* result);
55 55
56 // Delete all the segment usage data which is older than the provided time 56 // Delete all the segment usage data which is older than the provided time
57 // stamp. 57 // stamp.
58 void DeleteSegmentData(const Time& older_than); 58 void DeleteSegmentData(const base::Time& older_than);
59 59
60 // Change the presentation id for the segment identified by |segment_id| 60 // Change the presentation id for the segment identified by |segment_id|
61 void SetSegmentPresentationIndex(SegmentID segment_id, int index); 61 void SetSegmentPresentationIndex(SegmentID segment_id, int index);
62 62
63 // Delete the segment currently using the provided url for representation. 63 // Delete the segment currently using the provided url for representation.
64 // This will also delete any associated segment usage data. 64 // This will also delete any associated segment usage data.
65 bool DeleteSegmentForURL(URLID url_id); 65 bool DeleteSegmentForURL(URLID url_id);
66 66
67 protected: 67 protected:
68 // Returns the database and statement cache for the functions in this 68 // Returns the database and statement cache for the functions in this
(...skipping 10 matching lines...) Expand all
79 bool DropSegmentTables(); 79 bool DropSegmentTables();
80 80
81 private: 81 private:
82 DISALLOW_EVIL_CONSTRUCTORS(VisitSegmentDatabase); 82 DISALLOW_EVIL_CONSTRUCTORS(VisitSegmentDatabase);
83 }; 83 };
84 84
85 } // namespace history 85 } // namespace history
86 86
87 #endif // CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__ 87 #endif // CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H__
88 88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698