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

Side by Side Diff: ios/chrome/browser/ui/history/history_service_facade.h

Issue 2589313002: [ios] Wait for sync query to return before displaying history (Closed)
Patch Set: Use item types! Created 4 years 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 2016 The Chromium Authors. All rights reserved. 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 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 IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_
6 #define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_ 6 #define IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 28 matching lines...) Expand all
39 class HistoryServiceFacade : public history::HistoryServiceObserver { 39 class HistoryServiceFacade : public history::HistoryServiceObserver {
40 public: 40 public:
41 // Represents the result of a query to history service. 41 // Represents the result of a query to history service.
42 struct QueryResult { 42 struct QueryResult {
43 QueryResult(); 43 QueryResult();
44 QueryResult(const QueryResult&); 44 QueryResult(const QueryResult&);
45 ~QueryResult(); 45 ~QueryResult();
46 base::string16 query; 46 base::string16 query;
47 base::string16 query_start_time; 47 base::string16 query_start_time;
48 base::string16 query_end_time; 48 base::string16 query_end_time;
49 // true if all local history from History service has been retrieved.
49 bool finished; 50 bool finished;
51 // true if a query to WebHistoryService has returned successfully.
52 bool sync_returned;
53 // true if results from WebHistoryService have been retrieved.
50 bool has_synced_results; 54 bool has_synced_results;
55 // true if all remote history from WebHistoryService has been retrieved.
51 bool sync_finished; 56 bool sync_finished;
52 std::vector<history::HistoryEntry> entries; 57 std::vector<history::HistoryEntry> entries;
53 }; 58 };
54 59
55 // Represents a history entry removed by the client. 60 // Represents a history entry removed by the client.
56 struct RemovedEntry { 61 struct RemovedEntry {
57 RemovedEntry(const GURL& url, const base::Time& timestamp); 62 RemovedEntry(const GURL& url, const base::Time& timestamp);
58 RemovedEntry(const GURL& url, const std::vector<base::Time>& timestamps); 63 RemovedEntry(const GURL& url, const std::vector<base::Time>& timestamps);
59 RemovedEntry(const RemovedEntry&); 64 RemovedEntry(const RemovedEntry&);
60 ~RemovedEntry(); 65 ~RemovedEntry();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 166
162 // Delegate for HistoryServiceFacade. Serves as client for HistoryService. 167 // Delegate for HistoryServiceFacade. Serves as client for HistoryService.
163 base::WeakNSProtocol<id<HistoryServiceFacadeDelegate>> delegate_; 168 base::WeakNSProtocol<id<HistoryServiceFacadeDelegate>> delegate_;
164 169
165 base::WeakPtrFactory<HistoryServiceFacade> weak_factory_; 170 base::WeakPtrFactory<HistoryServiceFacade> weak_factory_;
166 171
167 DISALLOW_COPY_AND_ASSIGN(HistoryServiceFacade); 172 DISALLOW_COPY_AND_ASSIGN(HistoryServiceFacade);
168 }; 173 };
169 174
170 #endif // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_ 175 #endif // IOS_CHROME_BROWSER_UI_HISTORY_HISTORY_SERVICE_FACADE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698