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

Side by Side Diff: chrome/browser/banners/app_banner_settings_helper.cc

Issue 2806213002: Update the app banner action button to display "add" by default. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/banners/app_banner_settings_helper.h" 5 #include "chrome/browser/banners/app_banner_settings_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 AppBannerSettingsHelper::LanguageOption 395 AppBannerSettingsHelper::LanguageOption
396 AppBannerSettingsHelper::GetHomescreenLanguageOption() { 396 AppBannerSettingsHelper::GetHomescreenLanguageOption() {
397 std::string param = variations::GetVariationParamValue( 397 std::string param = variations::GetVariationParamValue(
398 kBannerParamsKey, kBannerParamsLanguageKey); 398 kBannerParamsKey, kBannerParamsLanguageKey);
399 unsigned int language_option = 0; 399 unsigned int language_option = 0;
400 400
401 if (param.empty() || !base::StringToUint(param, &language_option) || 401 if (param.empty() || !base::StringToUint(param, &language_option) ||
402 language_option < LANGUAGE_OPTION_MIN || 402 language_option < LANGUAGE_OPTION_MIN ||
403 language_option > LANGUAGE_OPTION_MAX) { 403 language_option > LANGUAGE_OPTION_MAX) {
404 return LANGUAGE_OPTION_DEFAULT; 404 return LANGUAGE_OPTION_ADD;
405 } 405 }
406 406
407 return static_cast<LanguageOption>(language_option); 407 return static_cast<LanguageOption>(language_option);
408 } 408 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698