OLD | NEW |
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 // Data structures for communication between the history service on the main | 5 // Data structures for communication between the history service on the main |
6 // thread and the backend on the history thread. | 6 // thread and the backend on the history thread. |
7 | 7 |
8 #ifndef CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ | 8 #ifndef CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ |
9 #define CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ | 9 #define CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ |
10 | 10 |
11 #include "base/scoped_vector.h" | 11 #include "base/scoped_vector.h" |
12 #include "chrome/browser/cancelable_request.h" | 12 #include "chrome/browser/cancelable_request.h" |
13 #include "chrome/browser/favicon_service.h" | 13 #include "chrome/browser/favicon_service.h" |
14 #include "chrome/browser/history/history.h" | 14 #include "chrome/browser/history/history.h" |
15 #include "chrome/browser/history/page_usage_data.h" | 15 #include "chrome/browser/history/page_usage_data.h" |
16 | 16 |
17 namespace history { | 17 namespace history { |
18 | 18 |
19 // Navigation ----------------------------------------------------------------- | 19 // Navigation ----------------------------------------------------------------- |
20 | 20 |
21 // Marshalling structure for AddPage. | 21 // Marshalling structure for AddPage. |
22 class HistoryAddPageArgs : public base::RefCounted<HistoryAddPageArgs> { | 22 class HistoryAddPageArgs |
| 23 : public base::RefCountedThreadSafe<HistoryAddPageArgs> { |
23 public: | 24 public: |
24 HistoryAddPageArgs(const GURL& arg_url, | 25 HistoryAddPageArgs(const GURL& arg_url, |
25 base::Time arg_time, | 26 base::Time arg_time, |
26 const void* arg_id_scope, | 27 const void* arg_id_scope, |
27 int32 arg_page_id, | 28 int32 arg_page_id, |
28 const GURL& arg_referrer, | 29 const GURL& arg_referrer, |
29 const history::RedirectList& arg_redirects, | 30 const history::RedirectList& arg_redirects, |
30 PageTransition::Type arg_transition, | 31 PageTransition::Type arg_transition, |
31 bool arg_did_replace_entry) | 32 bool arg_did_replace_entry) |
32 : url(arg_url), | 33 : url(arg_url), |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // The argument here is an input value, which is the task to run on the | 123 // The argument here is an input value, which is the task to run on the |
123 // background thread. The callback is used to execute the portion of the task | 124 // background thread. The callback is used to execute the portion of the task |
124 // that executes on the main thread. | 125 // that executes on the main thread. |
125 typedef CancelableRequest1<HistoryService::HistoryDBTaskCallback, | 126 typedef CancelableRequest1<HistoryService::HistoryDBTaskCallback, |
126 scoped_refptr<HistoryDBTask> > | 127 scoped_refptr<HistoryDBTask> > |
127 HistoryDBTaskRequest; | 128 HistoryDBTaskRequest; |
128 | 129 |
129 } // namespace history | 130 } // namespace history |
130 | 131 |
131 #endif // CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ | 132 #endif // CHROME_BROWSER_HISTORY_HISTORY_MARSHALING_H__ |
OLD | NEW |