Chromium Code Reviews| Index: components/history/core/browser/web_history_service.h |
| diff --git a/chrome/browser/history/web_history_service.h b/components/history/core/browser/web_history_service.h |
| similarity index 86% |
| rename from chrome/browser/history/web_history_service.h |
| rename to components/history/core/browser/web_history_service.h |
| index e492b0d18ff1964425657e14f0bc7930bfbba2a0..2c0b8b01041e4fa6b558635eee6034c280f0c141 100644 |
| --- a/chrome/browser/history/web_history_service.h |
| +++ b/components/history/core/browser/web_history_service.h |
| @@ -2,13 +2,15 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_H_ |
| -#define CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_H_ |
| +#ifndef COMPONENTS_HISTORY_CORE_BROWSER_WEB_HISTORY_SERVICE_H_ |
| +#define COMPONENTS_HISTORY_CORE_BROWSER_WEB_HISTORY_SERVICE_H_ |
| #include <set> |
| +#include <string> |
| +#include <vector> |
| +#include "base/memory/ref_counted.h" |
| #include "base/memory/weak_ptr.h" |
| -#include "chrome/browser/profiles/profile.h" |
| #include "components/history/core/browser/history_types.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| @@ -17,9 +19,12 @@ class DictionaryValue; |
| } |
| namespace net { |
| -class URLFetcher; |
| +class URLRequestContextGetter; |
| } |
| +class ProfileOAuth2TokenService; |
| +class SigninManagerBase; |
| + |
| namespace history { |
| // Provides an API for querying Google servers for a signed-in user's |
| @@ -67,7 +72,10 @@ class WebHistoryService : public KeyedService { |
| typedef base::Callback<void(Request*, bool success)> CompletionCallback; |
| - explicit WebHistoryService(Profile* profile); |
| + WebHistoryService( |
| + ProfileOAuth2TokenService* token_service, |
|
Roger Tawa OOO till Jul 10th
2015/01/28 13:11:38
Please use OAuth2TokenService instead of ProfileOA
|
| + SigninManagerBase* signin_manager, |
| + const scoped_refptr<net::URLRequestContextGetter>& request_context); |
| ~WebHistoryService() override; |
| // Searches synced history for visits matching |text_query|. The timeframe to |
| @@ -141,7 +149,14 @@ class WebHistoryService : public KeyedService { |
| private: |
| friend class WebHistoryServiceTest; |
| - Profile* profile_; |
| + // Stores pointer to ProfileOAuth2TokenService and SigninManagerBase keyed |
| + // service instance. Normal KeyedService dependencies ensure that they do |
|
droger
2015/01/28 11:03:16
Nit: remove "Normal", it's not clear for me what i
|
| + // outlive the current service. |
| + ProfileOAuth2TokenService* token_service_; |
| + SigninManagerBase* signin_manager_; |
| + |
| + // Request context getter to use. |
| + scoped_refptr<net::URLRequestContextGetter> request_context_; |
| // Stores the version_info token received from the server in response to |
| // a mutation operation (e.g., deleting history). This is used to ensure that |
| @@ -162,4 +177,4 @@ class WebHistoryService : public KeyedService { |
| } // namespace history |
| -#endif // CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_H_ |
| +#endif // COMPONENTS_HISTORY_CORE_BROWSER_WEB_HISTORY_SERVICE_H_ |