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

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

Issue 896983003: Componentize ScoredHistoryMatch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit warnings Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/callback_list.h" 14 #include "base/callback_list.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/strings/string16.h" 21 #include "base/strings/string16.h"
22 #include "base/task/cancelable_task_tracker.h" 22 #include "base/task/cancelable_task_tracker.h"
23 #include "base/threading/thread_checker.h" 23 #include "base/threading/thread_checker.h"
24 #include "base/time/time.h" 24 #include "base/time/time.h"
25 #include "chrome/browser/history/delete_directive_handler.h" 25 #include "chrome/browser/history/delete_directive_handler.h"
26 #include "chrome/browser/history/typed_url_syncable_service.h" 26 #include "chrome/browser/history/typed_url_syncable_service.h"
27 #include "components/favicon_base/favicon_callback.h" 27 #include "components/favicon_base/favicon_callback.h"
28 #include "components/history/core/browser/history_client.h"
29 #include "components/history/core/browser/keyword_id.h" 28 #include "components/history/core/browser/keyword_id.h"
30 #include "components/keyed_service/core/keyed_service.h" 29 #include "components/keyed_service/core/keyed_service.h"
31 #include "components/visitedlink/browser/visitedlink_delegate.h" 30 #include "components/visitedlink/browser/visitedlink_delegate.h"
32 #include "sql/init_status.h" 31 #include "sql/init_status.h"
33 #include "sync/api/syncable_service.h" 32 #include "sync/api/syncable_service.h"
34 #include "ui/base/page_transition_types.h" 33 #include "ui/base/page_transition_types.h"
35 34
36 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
37 class AndroidHistoryProviderService; 36 class AndroidHistoryProviderService;
38 #endif 37 #endif
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 history::VisitSource visit_source); 488 history::VisitSource visit_source);
490 489
491 // The same as AddPageWithDetails() but takes a vector. 490 // The same as AddPageWithDetails() but takes a vector.
492 void AddPagesWithDetails(const history::URLRows& info, 491 void AddPagesWithDetails(const history::URLRows& info,
493 history::VisitSource visit_source); 492 history::VisitSource visit_source);
494 493
495 // Returns true if this looks like the type of URL we want to add to the 494 // Returns true if this looks like the type of URL we want to add to the
496 // history. We filter out some URLs such as JavaScript. 495 // history. We filter out some URLs such as JavaScript.
497 static bool CanAddURL(const GURL& url); 496 static bool CanAddURL(const GURL& url);
498 497
499 // Returns the HistoryClient.
500 history::HistoryClient* history_client() { return history_client_; }
501
502 base::WeakPtr<HistoryService> AsWeakPtr(); 498 base::WeakPtr<HistoryService> AsWeakPtr();
503 499
504 // syncer::SyncableService implementation. 500 // syncer::SyncableService implementation.
505 syncer::SyncMergeResult MergeDataAndStartSyncing( 501 syncer::SyncMergeResult MergeDataAndStartSyncing(
506 syncer::ModelType type, 502 syncer::ModelType type,
507 const syncer::SyncDataList& initial_sync_data, 503 const syncer::SyncDataList& initial_sync_data,
508 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 504 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
509 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; 505 scoped_ptr<syncer::SyncErrorFactory> error_handler) override;
510 void StopSyncing(syncer::ModelType type) override; 506 void StopSyncing(syncer::ModelType type) override;
511 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; 507 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 834
839 history::DeleteDirectiveHandler delete_directive_handler_; 835 history::DeleteDirectiveHandler delete_directive_handler_;
840 836
841 // All vended weak pointers are invalidated in Cleanup(). 837 // All vended weak pointers are invalidated in Cleanup().
842 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; 838 base::WeakPtrFactory<HistoryService> weak_ptr_factory_;
843 839
844 DISALLOW_COPY_AND_ASSIGN(HistoryService); 840 DISALLOW_COPY_AND_ASSIGN(HistoryService);
845 }; 841 };
846 842
847 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 843 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698