Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ | 5 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ |
| 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ | 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 // request's status. Returns false if |request| is not a blacklist request. | 81 // request's status. Returns false if |request| is not a blacklist request. |
| 82 static bool GetBlacklistedUrl(const net::URLFetcher& request, GURL* url); | 82 static bool GetBlacklistedUrl(const net::URLFetcher& request, GURL* url); |
| 83 | 83 |
| 84 // Register SuggestionsService related prefs in the Profile prefs. | 84 // Register SuggestionsService related prefs in the Profile prefs. |
| 85 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 85 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 friend class SuggestionsServiceTest; | 88 friend class SuggestionsServiceTest; |
| 89 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData); | 89 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData); |
| 90 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, | 90 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, |
| 91 BuildUrlWithAllParameterForFewFeature); | |
|
Marc Treib
2017/05/08 14:26:04
Heads-up: You'll probably get merge conflicts with
fhorschig
2017/05/10 09:51:16
Acknowledged.
| |
| 92 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, | |
| 91 FetchSuggestionsDataSyncDisabled); | 93 FetchSuggestionsDataSyncDisabled); |
| 92 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, | 94 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, |
| 93 FetchSuggestionsDataNoAccessToken); | 95 FetchSuggestionsDataNoAccessToken); |
| 94 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, | 96 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, |
| 95 IssueRequestIfNoneOngoingError); | 97 IssueRequestIfNoneOngoingError); |
| 96 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, | 98 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, |
| 97 IssueRequestIfNoneOngoingResponseNotOK); | 99 IssueRequestIfNoneOngoingResponseNotOK); |
| 98 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURL); | 100 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURL); |
| 99 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLRequestFails); | 101 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLRequestFails); |
| 100 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, ClearBlacklist); | 102 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, ClearBlacklist); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 | 206 |
| 205 // For callbacks may be run after destruction. | 207 // For callbacks may be run after destruction. |
| 206 base::WeakPtrFactory<SuggestionsServiceImpl> weak_ptr_factory_; | 208 base::WeakPtrFactory<SuggestionsServiceImpl> weak_ptr_factory_; |
| 207 | 209 |
| 208 DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceImpl); | 210 DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceImpl); |
| 209 }; | 211 }; |
| 210 | 212 |
| 211 } // namespace suggestions | 213 } // namespace suggestions |
| 212 | 214 |
| 213 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ | 215 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ |
| OLD | NEW |