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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/locale/SogouPromoDialog.java

Issue 2857893003: Replace search_sogou.png with a vector drawable (Closed)
Patch Set: Fix tests Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 package org.chromium.chrome.browser.locale; 5 package org.chromium.chrome.browser.locale;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.DialogInterface; 8 import android.content.DialogInterface;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.os.Bundle; 10 import android.os.Bundle;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 super(context); 73 super(context);
74 mLocaleManager = localeManager; 74 mLocaleManager = localeManager;
75 setOnDismissListener(this); 75 setOnDismissListener(this);
76 setCanceledOnTouchOutside(false); 76 setCanceledOnTouchOutside(false);
77 mOnDismissedCallback = onDismissed; 77 mOnDismissedCallback = onDismissed;
78 } 78 }
79 79
80 @Override 80 @Override
81 protected DialogParams getDialogParams() { 81 protected DialogParams getDialogParams() {
82 PromoDialog.DialogParams params = new PromoDialog.DialogParams(); 82 PromoDialog.DialogParams params = new PromoDialog.DialogParams();
83 params.drawableResource = R.drawable.search_sogou; 83 params.vectorDrawableResource = R.drawable.search_sogou;
84 params.headerStringResource = R.string.search_with_sogou; 84 params.headerStringResource = R.string.search_with_sogou;
85 params.subheaderStringResource = R.string.sogou_explanation; 85 params.subheaderStringResource = R.string.sogou_explanation;
86 params.primaryButtonStringResource = R.string.ok; 86 params.primaryButtonStringResource = R.string.ok;
87 params.secondaryButtonStringResource = R.string.keep_google; 87 params.secondaryButtonStringResource = R.string.keep_google;
88 return params; 88 return params;
89 } 89 }
90 90
91 @Override 91 @Override
92 protected void onCreate(Bundle savedInstanceState) { 92 protected void onCreate(Bundle savedInstanceState) {
93 super.onCreate(savedInstanceState); 93 super.onCreate(savedInstanceState);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ContextUtils.getAppSharedPreferences() 147 ContextUtils.getAppSharedPreferences()
148 .edit() 148 .edit()
149 .putBoolean(LocaleManager.PREF_PROMO_SHOWN, true) 149 .putBoolean(LocaleManager.PREF_PROMO_SHOWN, true)
150 .apply(); 150 .apply();
151 RecordHistogram.recordEnumeratedHistogram( 151 RecordHistogram.recordEnumeratedHistogram(
152 "SpecialLocale.PromotionDialog", mChoice, CHOICE_ENUM_COUNT); 152 "SpecialLocale.PromotionDialog", mChoice, CHOICE_ENUM_COUNT);
153 153
154 if (mOnDismissedCallback != null) mOnDismissedCallback.onResult(true); 154 if (mOnDismissedCallback != null) mOnDismissedCallback.onResult(true);
155 } 155 }
156 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698