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

Side by Side Diff: components/search_provider_logos/logo_tracker.h

Issue 1343913002: Introduce Animated Logo to Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to newt's comments Created 5 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_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 5 #ifndef COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 6 #define COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 }; 65 };
66 66
67 // Parses the response from the server and returns it as an EncodedLogo. Returns 67 // Parses the response from the server and returns it as an EncodedLogo. Returns
68 // NULL if the response is invalid. 68 // NULL if the response is invalid.
69 typedef base::Callback< 69 typedef base::Callback<
70 scoped_ptr<EncodedLogo>(const scoped_ptr<std::string>& response, 70 scoped_ptr<EncodedLogo>(const scoped_ptr<std::string>& response,
71 base::Time response_time)> ParseLogoResponse; 71 base::Time response_time)> ParseLogoResponse;
72 72
73 // Encodes the fingerprint of the cached logo in the logo URL. This enables the 73 // Encodes the fingerprint of the cached logo in the logo URL. This enables the
74 // server to verify whether the cached logo is up-to-date. 74 // server to verify whether the cached logo is up-to-date.
75 // TODO(ianwen): remove wants_cta from parameter.
newt (away) 2015/09/23 20:38:44 I approve of this TODO, but it's in the wrong plac
Ian Wen 2015/09/23 21:59:52 Done.
75 typedef base::Callback<GURL(const GURL& logo_url, 76 typedef base::Callback<GURL(const GURL& logo_url,
76 const std::string& fingerprint, 77 const std::string& fingerprint,
77 bool wants_cta)> AppendQueryparamsToLogoURL; 78 bool wants_cta)> AppendQueryparamsToLogoURL;
78 79
79 // This class provides the logo for a search provider. Logos are downloaded from 80 // This class provides the logo for a search provider. Logos are downloaded from
80 // the search provider's logo URL and cached on disk. 81 // the search provider's logo URL and cached on disk.
81 // 82 //
82 // Call SetServerAPI() at least once to specify how to get the logo from the 83 // Call SetServerAPI() at least once to specify how to get the logo from the
83 // server. Then call GetLogo() to trigger retrieval of the logo and receive 84 // server. Then call GetLogo() to trigger retrieval of the logo and receive
84 // updates once the cached and/or fresh logos are available. 85 // updates once the cached and/or fresh logos are available.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 230 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
230 231
231 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_; 232 base::WeakPtrFactory<LogoTracker> weak_ptr_factory_;
232 233
233 DISALLOW_COPY_AND_ASSIGN(LogoTracker); 234 DISALLOW_COPY_AND_ASSIGN(LogoTracker);
234 }; 235 };
235 236
236 } // namespace search_provider_logos 237 } // namespace search_provider_logos
237 238
238 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_ 239 #endif // COMPONENTS_SEARCH_PROVIDER_LOGOS_LOGO_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698