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

Side by Side Diff: components/suggestions/suggestions_service_impl.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 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 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // Helpers to build the various suggestions URLs. These are static members 106 // Helpers to build the various suggestions URLs. These are static members
107 // rather than local functions in the .cc file to make them accessible to 107 // rather than local functions in the .cc file to make them accessible to
108 // tests. 108 // tests.
109 static GURL BuildSuggestionsURL(); 109 static GURL BuildSuggestionsURL();
110 static std::string BuildSuggestionsBlacklistURLPrefix(); 110 static std::string BuildSuggestionsBlacklistURLPrefix();
111 static GURL BuildSuggestionsBlacklistURL(const GURL& candidate_url); 111 static GURL BuildSuggestionsBlacklistURL(const GURL& candidate_url);
112 static GURL BuildSuggestionsBlacklistClearURL(); 112 static GURL BuildSuggestionsBlacklistClearURL();
113 113
114 // syncer::SyncServiceObserver implementation. 114 // syncer::SyncServiceObserver implementation.
115 void OnStateChanged() override; 115 void OnStateChanged(syncer::SyncService* sync) override;
116 116
117 // Sets default timestamp for suggestions which do not have expiry timestamp. 117 // Sets default timestamp for suggestions which do not have expiry timestamp.
118 void SetDefaultExpiryTimestamp(SuggestionsProfile* suggestions, 118 void SetDefaultExpiryTimestamp(SuggestionsProfile* suggestions,
119 int64_t timestamp_usec); 119 int64_t timestamp_usec);
120 120
121 // Issues a network request if there isn't already one happening. 121 // Issues a network request if there isn't already one happening.
122 void IssueRequestIfNoneOngoing(const GURL& url); 122 void IssueRequestIfNoneOngoing(const GURL& url);
123 123
124 // Called when an access token request completes (successfully or not). 124 // Called when an access token request completes (successfully or not).
125 void AccessTokenAvailable(const GURL& url, 125 void AccessTokenAvailable(const GURL& url,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // For callbacks may be run after destruction. 204 // For callbacks may be run after destruction.
205 base::WeakPtrFactory<SuggestionsServiceImpl> weak_ptr_factory_; 205 base::WeakPtrFactory<SuggestionsServiceImpl> weak_ptr_factory_;
206 206
207 DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceImpl); 207 DISALLOW_COPY_AND_ASSIGN(SuggestionsServiceImpl);
208 }; 208 };
209 209
210 } // namespace suggestions 210 } // namespace suggestions
211 211
212 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_ 212 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698