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

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

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 years, 7 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_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 5 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 private: 105 private:
106 friend class SuggestionsServiceTest; 106 friend class SuggestionsServiceTest;
107 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURL); 107 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURL);
108 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLRequestFails); 108 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLRequestFails);
109 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURL); 109 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURL);
110 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURLFailsHelper); 110 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURLFailsHelper);
111 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UpdateBlacklistDelay); 111 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UpdateBlacklistDelay);
112 112
113 // Creates a request to the suggestions service, properly setting headers. 113 // Creates a request to the suggestions service, properly setting headers.
114 net::URLFetcher* CreateSuggestionsRequest(const GURL& url); 114 scoped_ptr<net::URLFetcher> CreateSuggestionsRequest(const GURL& url);
115 115
116 // net::URLFetcherDelegate implementation. 116 // net::URLFetcherDelegate implementation.
117 // Called when fetch request completes. Parses the received suggestions data, 117 // Called when fetch request completes. Parses the received suggestions data,
118 // and dispatches them to callbacks stored in queue. 118 // and dispatches them to callbacks stored in queue.
119 void OnURLFetchComplete(const net::URLFetcher* source) override; 119 void OnURLFetchComplete(const net::URLFetcher* source) override;
120 120
121 // KeyedService implementation. 121 // KeyedService implementation.
122 void Shutdown() override; 122 void Shutdown() override;
123 123
124 // Loads the cached suggestions (or empty suggestions if no cache) and serves 124 // Loads the cached suggestions (or empty suggestions if no cache) and serves
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 // For callbacks may be run after destruction. 180 // For callbacks may be run after destruction.
181 base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_; 181 base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_;
182 182
183 DISALLOW_COPY_AND_ASSIGN(SuggestionsService); 183 DISALLOW_COPY_AND_ASSIGN(SuggestionsService);
184 }; 184 };
185 185
186 } // namespace suggestions 186 } // namespace suggestions
187 187
188 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 188 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
OLDNEW
« no previous file with comments | « components/signin/core/browser/gaia_cookie_manager_service.cc ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698