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

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

Issue 554233002: Refactoring the WeakPtrFactory usage, Member variables should appear before the WeakPtrFactory, to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 std::vector<ResponseCallback> waiting_requestors_; 181 std::vector<ResponseCallback> waiting_requestors_;
182 182
183 // Used to obtain server thumbnails, if available. 183 // Used to obtain server thumbnails, if available.
184 scoped_ptr<ImageManager> thumbnail_manager_; 184 scoped_ptr<ImageManager> thumbnail_manager_;
185 185
186 net::URLRequestContextGetter* url_request_context_; 186 net::URLRequestContextGetter* url_request_context_;
187 187
188 // Delay used when scheduling a blacklisting task. 188 // Delay used when scheduling a blacklisting task.
189 int blacklist_delay_sec_; 189 int blacklist_delay_sec_;
190 190
191 // For callbacks may be run after destruction.
192 base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_;
193
194 // Timeout (in ms) before serving requestors after a fetch suggestions request 191 // Timeout (in ms) before serving requestors after a fetch suggestions request
195 // has been issued. 192 // has been issued.
196 int request_timeout_ms_; 193 int request_timeout_ms_;
197 194
195 // For callbacks may be run after destruction.
196 base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_;
197
198 DISALLOW_COPY_AND_ASSIGN(SuggestionsService); 198 DISALLOW_COPY_AND_ASSIGN(SuggestionsService);
199 }; 199 };
200 200
201 } // namespace suggestions 201 } // namespace suggestions
202 202
203 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 203 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698