| Index: components/search_provider_logos/logo_tracker.h
|
| diff --git a/components/search_provider_logos/logo_tracker.h b/components/search_provider_logos/logo_tracker.h
|
| index 1bfa40301263a3c124a5b7815c6e20eda6d4ddd5..182eed7d152689f4e69bad520fdfae417b7f9e6b 100644
|
| --- a/components/search_provider_logos/logo_tracker.h
|
| +++ b/components/search_provider_logos/logo_tracker.h
|
| @@ -72,9 +72,9 @@ typedef base::Callback<
|
|
|
| // Encodes the fingerprint of the cached logo in the logo URL. This enables the
|
| // server to verify whether the cached logo is up-to-date.
|
| -typedef base::Callback<
|
| - GURL(const GURL& logo_url, const std::string& fingerprint)>
|
| - AppendFingerprintToLogoURL;
|
| +typedef base::Callback<GURL(const GURL& logo_url,
|
| + const std::string& fingerprint,
|
| + bool wants_cta)> AppendQueryparamsToLogoURL;
|
|
|
| // This class provides the logo for a search provider. Logos are downloaded from
|
| // the search provider's logo URL and cached on disk.
|
| @@ -115,14 +115,15 @@ class LogoTracker : public net::URLFetcherDelegate {
|
| // canceled.
|
| //
|
| // |parse_logo_response_func| is a callback that will be used to parse the
|
| - // server's response into a EncodedLogo object. |append_fingerprint_func| is a
|
| - // callback that will return the URL from which to download the logo if a
|
| - // cached logo with a fingerprint is already available. Note:
|
| - // |parse_logo_response_func| and |append_fingerprint_func| must be suitable
|
| - // for running multiple times, concurrently, and on multiple threads.
|
| + // server's response into a EncodedLogo object. |append_queryparams_func| is a
|
| + // callback that will return the URL from which to download the logo.
|
| + // |wants_cta| determines if the url should return a call to action image.
|
| + // Note: |parse_logo_response_func| and |append_queryparams_func| must be
|
| + // suitable for running multiple times, concurrently, and on multiple threads.
|
| void SetServerAPI(const GURL& logo_url,
|
| const ParseLogoResponse& parse_logo_response_func,
|
| - const AppendFingerprintToLogoURL& append_fingerprint_func);
|
| + const AppendQueryparamsToLogoURL& append_queryparams_func,
|
| + bool wants_cta);
|
|
|
| // Retrieves the current search provider's logo from the local cache and/or
|
| // over the network, and registers |observer| to be called when the cached
|
| @@ -183,8 +184,12 @@ class LogoTracker : public net::URLFetcherDelegate {
|
| // The function used to parse the logo response from the server.
|
| ParseLogoResponse parse_logo_response_func_;
|
|
|
| - // The function used to include the cached logo's fingerprint in the logo URL.
|
| - AppendFingerprintToLogoURL append_fingerprint_func_;
|
| + // The function used to include the cached logo's fingerprint and call to
|
| + // action request in the logo URL.
|
| + AppendQueryparamsToLogoURL append_queryparams_func_;
|
| +
|
| + // If |true| request call to action in server API.
|
| + bool wants_cta_;
|
|
|
| // False if an asynchronous task is currently running.
|
| bool is_idle_;
|
|
|