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

Side by Side Diff: components/history/core/browser/history_client.h

Issue 1205603002: Remove dependency of HistoryServiceFactory on ChromeBookmarkClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_history_client
Patch Set: Remove change to BookmarkModelObserver and use BaseBookmarkModelObserver Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_
7 7
8 #include <set>
sky 2015/06/23 17:38:50 Seems like you shouldn't need either of these new
sdefresne 2015/06/23 21:46:33 Good catch. Removed.
9
10 #include "base/callback_forward.h"
8 #include "base/macros.h" 11 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
10 #include "sql/init_status.h" 13 #include "sql/init_status.h"
11 14
12 class GURL; 15 class GURL;
13 16
14 namespace base { 17 namespace base {
15 class FilePath; 18 class FilePath;
16 } 19 }
17 20
18 namespace history { 21 namespace history {
19 22
20 class HistoryBackend; 23 class HistoryBackend;
21 class HistoryBackendClient; 24 class HistoryBackendClient;
22 class HistoryDatabase; 25 class HistoryDatabase;
26 class HistoryService;
23 class ThumbnailDatabase; 27 class ThumbnailDatabase;
24 28
25 // This class abstracts operations that depend on the embedder's environment, 29 // This class abstracts operations that depend on the embedder's environment,
26 // e.g. Chrome. 30 // e.g. Chrome.
27 class HistoryClient { 31 class HistoryClient {
28 public: 32 public:
29 HistoryClient() {} 33 HistoryClient() {}
30 virtual ~HistoryClient() {} 34 virtual ~HistoryClient() {}
31 35
36 // Called upon HistoryService creation.
37 virtual void Init(HistoryService* history_service) = 0;
sky 2015/06/23 17:38:50 This name seems misleading. It isn't that HistoryC
sdefresne 2015/06/23 21:46:33 Done.
38
32 // Called before HistoryService is shutdown. 39 // Called before HistoryService is shutdown.
33 virtual void Shutdown() = 0; 40 virtual void Shutdown() = 0;
34 41
35 // Returns true if this look like the type of URL that should be added to the 42 // Returns true if this look like the type of URL that should be added to the
36 // history. 43 // history.
37 virtual bool CanAddURL(const GURL& url) = 0; 44 virtual bool CanAddURL(const GURL& url) = 0;
38 45
39 // Notifies the embedder that there was a problem reading the database. 46 // Notifies the embedder that there was a problem reading the database.
40 virtual void NotifyProfileError(sql::InitStatus init_status) = 0; 47 virtual void NotifyProfileError(sql::InitStatus init_status) = 0;
41 48
42 // Returns a new HistoryBackendClient instance. 49 // Returns a new HistoryBackendClient instance.
43 virtual scoped_ptr<HistoryBackendClient> CreateBackendClient() = 0; 50 virtual scoped_ptr<HistoryBackendClient> CreateBackendClient() = 0;
44 51
45 private: 52 private:
46 DISALLOW_COPY_AND_ASSIGN(HistoryClient); 53 DISALLOW_COPY_AND_ASSIGN(HistoryClient);
47 }; 54 };
48 55
49 } // namespace history 56 } // namespace history
50 57
51 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_ 58 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698