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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 years, 5 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) 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 #ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/callback.h"
16 #include "base/memory/ref_counted_memory.h" 17 #include "base/memory/ref_counted_memory.h"
17 #include "base/stack_container.h" 18 #include "base/stack_container.h"
18 #include "base/string16.h" 19 #include "base/string16.h"
19 #include "base/time.h" 20 #include "base/time.h"
20 #include "chrome/browser/history/snippet.h" 21 #include "chrome/browser/history/snippet.h"
21 #include "chrome/browser/search_engines/template_url_id.h" 22 #include "chrome/browser/search_engines/template_url_id.h"
22 #include "chrome/common/ref_counted_util.h" 23 #include "chrome/common/ref_counted_util.h"
23 #include "chrome/common/thumbnail_score.h" 24 #include "chrome/common/thumbnail_score.h"
24 #include "content/common/page_transition_types.h" 25 #include "content/common/page_transition_types.h"
25 #include "googleurl/src/gurl.h" 26 #include "googleurl/src/gurl.h"
27 #include "chrome/browser/history/download_history_info.h"
26 28
27 namespace history { 29 namespace history {
28 30
29 // Forward declaration for friend statements. 31 // Forward declaration for friend statements.
30 class HistoryBackend; 32 class HistoryBackend;
31 class URLDatabase; 33 class URLDatabase;
32 34
33 // Structure to hold redirect lists for URLs. For a redirect chain 35 // Structure to hold redirect lists for URLs. For a redirect chain
34 // A -> B -> C, and entry in the map would look like "A => {B -> C}". 36 // A -> B -> C, and entry in the map would look like "A => {B -> C}".
35 typedef std::map<GURL, scoped_refptr<RefCountedVector<GURL> > > RedirectMap; 37 typedef std::map<GURL, scoped_refptr<RefCountedVector<GURL> > > RedirectMap;
36 38
37 // Container for a list of URLs. 39 // Container for a list of URLs.
38 typedef std::vector<GURL> RedirectList; 40 typedef std::vector<GURL> RedirectList;
39 41
40 typedef int64 StarID; // Unique identifier for star entries. 42 typedef int64 StarID; // Unique identifier for star entries.
41 typedef int64 UIStarID; // Identifier for star entries that come from the UI. 43 typedef int64 UIStarID; // Identifier for star entries that come from the UI.
42 typedef int64 DownloadID; // Identifier for a download. 44 typedef int64 DownloadID; // Identifier for a download.
43 typedef int64 FaviconID; // For favicons. 45 typedef int64 FaviconID; // For favicons.
44 typedef int64 SegmentID; // URL segments for the most visited view. 46 typedef int64 SegmentID; // URL segments for the most visited view.
45 typedef int64 IconMappingID; // For page url and icon mapping. 47 typedef int64 IconMappingID; // For page url and icon mapping.
46 48
49
50 struct DownloadQueryParameters {
51 typedef base::Callback<int()> GetNextIdThunk;
52
53 DownloadQueryParameters() {}
54 ~DownloadQueryParameters() {}
55
56 GetNextIdThunk get_next_id;
57 std::vector<DownloadHistoryInfo> results;
58 // Allow copy and assign.
59 };
60
47 // URLRow --------------------------------------------------------------------- 61 // URLRow ---------------------------------------------------------------------
48 62
49 typedef int64 URLID; 63 typedef int64 URLID;
50 64
51 // Holds all information globally associated with one URL (one row in the 65 // Holds all information globally associated with one URL (one row in the
52 // URL table). 66 // URL table).
53 // 67 //
54 // This keeps track of dirty bits, which are currently unused: 68 // This keeps track of dirty bits, which are currently unused:
55 // 69 //
56 // TODO(brettw) the dirty bits are broken in a number of respects. First, the 70 // TODO(brettw) the dirty bits are broken in a number of respects. First, the
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 // The icon's URL. 756 // The icon's URL.
743 GURL icon_url; 757 GURL icon_url;
744 758
745 // The type of favicon. 759 // The type of favicon.
746 history::IconType icon_type; 760 history::IconType icon_type;
747 }; 761 };
748 762
749 } // namespace history 763 } // namespace history
750 764
751 #endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_ 765 #endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/history_marshaling.h ('k') | chrome/browser/renderer_host/download_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698