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

Unified Diff: chrome/browser/android/logo_service.cc

Issue 1343913002: Introduce Animated Logo to Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/logo_service.cc
diff --git a/chrome/browser/android/logo_service.cc b/chrome/browser/android/logo_service.cc
index 35e3ce0cad734da65fb2e51dad4c300e7c34b096..5fbc051211d51ef333dbde95d6104b70f8d4ffb5 100644
--- a/chrome/browser/android/logo_service.cc
+++ b/chrome/browser/android/logo_service.cc
@@ -17,6 +17,7 @@
#include "net/url_request/url_request_context_getter.h"
using content::BrowserThread;
+using search_provider_logos::AnimatedLogoTracker;
using search_provider_logos::Logo;
using search_provider_logos::LogoDelegate;
using search_provider_logos::LogoTracker;
@@ -35,6 +36,7 @@ GURL GetGoogleDoodleURL(Profile* profile) {
GURL::Replacements replacements;
replacements.SetPathStr(kGoogleDoodleURLPath);
return google_base_url.ReplaceComponents(replacements);
+ return GURL(url);
}
class LogoDecoderDelegate : public ImageDecoder::ImageRequest {
@@ -125,10 +127,21 @@ void LogoService::GetLogo(search_provider_logos::LogoObserver* observer) {
GetGoogleDoodleURL(profile_),
base::Bind(&search_provider_logos::GoogleParseLogoResponse),
base::Bind(&search_provider_logos::GoogleAppendQueryparamsToLogoURL),
- false);
+ true);
logo_tracker_->GetLogo(observer);
}
+void LogoService::GetAnimatedLogo(
+ const GURL& animated_logo_url,
+ const search_provider_logos::AnimatedLogoCallback& callback) {
+
+ if (!animated_logo_tracker_) {
+ animated_logo_tracker_.reset(
+ new AnimatedLogoTracker(profile_->GetRequestContext()));
+ }
+ animated_logo_tracker_->GetAnimatedLogo(animated_logo_url, callback);
+}
+
// LogoServiceFactory ---------------------------------------------------------
// static

Powered by Google App Engine
This is Rietveld 408576698