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

Side by Side Diff: chrome/browser/ui/webui/browsing_history_handler.h

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 12
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/scoped_observer.h" 15 #include "base/scoped_observer.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/task/cancelable_task_tracker.h" 17 #include "base/task/cancelable_task_tracker.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "components/history/core/browser/history_service_observer.h" 20 #include "components/history/core/browser/history_service_observer.h"
21 #include "components/history/core/browser/url_row.h" 21 #include "components/history/core/browser/url_row.h"
22 #include "components/history/core/browser/web_history_service.h" 22 #include "components/history/core/browser/web_history_service.h"
23 #include "content/public/browser/web_ui_message_handler.h" 23 #include "content/public/browser/web_ui_message_handler.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool is_search_result, const base::string16& snippet, 58 bool is_search_result, const base::string16& snippet,
59 bool blocked_visit); 59 bool blocked_visit);
60 HistoryEntry(); 60 HistoryEntry();
61 HistoryEntry(const HistoryEntry& other); 61 HistoryEntry(const HistoryEntry& other);
62 virtual ~HistoryEntry(); 62 virtual ~HistoryEntry();
63 63
64 // Formats this entry's URL and title and adds them to |result|. 64 // Formats this entry's URL and title and adds them to |result|.
65 void SetUrlAndTitle(base::DictionaryValue* result) const; 65 void SetUrlAndTitle(base::DictionaryValue* result) const;
66 66
67 // Converts the entry to a DictionaryValue to be owned by the caller. 67 // Converts the entry to a DictionaryValue to be owned by the caller.
68 scoped_ptr<base::DictionaryValue> ToValue( 68 std::unique_ptr<base::DictionaryValue> ToValue(
69 bookmarks::BookmarkModel* bookmark_model, 69 bookmarks::BookmarkModel* bookmark_model,
70 SupervisedUserService* supervised_user_service, 70 SupervisedUserService* supervised_user_service,
71 const ProfileSyncService* sync_service) const; 71 const ProfileSyncService* sync_service) const;
72 72
73 // Comparison function for sorting HistoryEntries from newest to oldest. 73 // Comparison function for sorting HistoryEntries from newest to oldest.
74 static bool SortByTimeDescending( 74 static bool SortByTimeDescending(
75 const HistoryEntry& entry1, const HistoryEntry& entry2); 75 const HistoryEntry& entry1, const HistoryEntry& entry2);
76 76
77 // The type of visits this entry represents: local, remote, or both. 77 // The type of visits this entry represents: local, remote, or both.
78 EntryType entry_type; 78 EntryType entry_type;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 bool all_history, 187 bool all_history,
188 bool expired, 188 bool expired,
189 const history::URLRows& deleted_rows, 189 const history::URLRows& deleted_rows,
190 const std::set<GURL>& favicon_urls) override; 190 const std::set<GURL>& favicon_urls) override;
191 191
192 // Tracker for search requests to the history service. 192 // Tracker for search requests to the history service.
193 base::CancelableTaskTracker query_task_tracker_; 193 base::CancelableTaskTracker query_task_tracker_;
194 194
195 // The currently-executing request for synced history results. 195 // The currently-executing request for synced history results.
196 // Deleting the request will cancel it. 196 // Deleting the request will cancel it.
197 scoped_ptr<history::WebHistoryService::Request> web_history_request_; 197 std::unique_ptr<history::WebHistoryService::Request> web_history_request_;
198 198
199 // True if there is a pending delete requests to the history service. 199 // True if there is a pending delete requests to the history service.
200 bool has_pending_delete_request_; 200 bool has_pending_delete_request_;
201 201
202 // Tracker for delete requests to the history service. 202 // Tracker for delete requests to the history service.
203 base::CancelableTaskTracker delete_task_tracker_; 203 base::CancelableTaskTracker delete_task_tracker_;
204 204
205 // The list of URLs that are in the process of being deleted. 205 // The list of URLs that are in the process of being deleted.
206 std::set<GURL> urls_to_be_deleted_; 206 std::set<GURL> urls_to_be_deleted_;
207 207
(...skipping 17 matching lines...) Expand all
225 225
226 // Whether there are other forms of browsing history on the history server. 226 // Whether there are other forms of browsing history on the history server.
227 bool has_other_forms_of_browsing_history_; 227 bool has_other_forms_of_browsing_history_;
228 228
229 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_; 229 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_;
230 230
231 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); 231 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler);
232 }; 232 };
233 233
234 #endif // CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ 234 #endif // CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/app_list/start_page_ui.cc ('k') | chrome/browser/ui/webui/browsing_history_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698