| 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 87%
|
| rename from chrome/browser/history/web_history_service.h
|
| rename to components/history/core/browser/web_history_service.h
|
| index e492b0d18ff1964425657e14f0bc7930bfbba2a0..c58e07c973debc646f67e25239b5511ccadd5ca8 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 OAuth2TokenService;
|
| +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(
|
| + OAuth2TokenService* token_service,
|
| + 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,13 @@ class WebHistoryService : public KeyedService {
|
| private:
|
| friend class WebHistoryServiceTest;
|
|
|
| - Profile* profile_;
|
| + // Stores pointer to OAuth2TokenService and SigninManagerBase instance. They
|
| + // must outlive the WebHistoryService and can be null during tests.
|
| + OAuth2TokenService* 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 +176,4 @@ class WebHistoryService : public KeyedService {
|
|
|
| } // namespace history
|
|
|
| -#endif // CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_H_
|
| +#endif // COMPONENTS_HISTORY_CORE_BROWSER_WEB_HISTORY_SERVICE_H_
|
|
|