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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc

Issue 2318333003: [ARC] Add "(beta)" string to Play Store. (Closed)
Patch Set: Created 4 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/ui/app_list/arc/arc_app_list_prefs.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
index 460d66ceabfab914ee8b9bcb777b41be4a6c0228..0073c9aa46264e3c2459d7fea5df325a51b6eef3 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
@@ -18,11 +18,13 @@
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/app_list/arc/arc_package_syncable_service.h"
#include "chrome/common/pref_names.h"
+#include "chrome/grit/generated_resources.h"
#include "components/arc/arc_bridge_service.h"
#include "components/crx_file/id_util.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "content/public/browser/browser_thread.h"
+#include "ui/base/l10n/l10n_util.h"
namespace {
@@ -695,20 +697,29 @@ void ArcAppListPrefs::AddAppAndShortcut(
const arc::mojom::OrientationLock orientation_lock) {
const std::string app_id = shortcut ? GetAppId(package_name, intent_uri)
: GetAppId(package_name, activity);
+
+ // |name_beta| will be only used on M53 and will be reverted on later version.
+ std::string name_beta = name;
+ if (app_id == arc::kPlayStoreAppId) {
+ name_beta = name + " (" +
xiyuan 2016/09/07 22:56:36 Don't like the concatenation but don't have a bett
xdai1 2016/09/07 23:25:01 Renamed it.
+ l10n_util::GetStringUTF8(IDS_ABOUT_PAGE_CURRENT_CHANNEL_BETA) +
+ ")";
+ }
+
const bool was_registered = IsRegistered(app_id);
if (was_registered) {
std::unique_ptr<ArcAppListPrefs::AppInfo> app_old_info = GetApp(app_id);
DCHECK(app_old_info);
DCHECK(launchable);
- if (name != app_old_info->name) {
+ if (name_beta != app_old_info->name) {
FOR_EACH_OBSERVER(Observer, observer_list_,
- OnAppNameUpdated(app_id, name));
+ OnAppNameUpdated(app_id, name_beta));
}
}
ScopedArcPrefUpdate update(prefs_, app_id, prefs::kArcApps);
base::DictionaryValue* app_dict = update.Get();
- app_dict->SetString(kName, name);
+ app_dict->SetString(kName, name_beta);
app_dict->SetString(kPackageName, package_name);
app_dict->SetString(kActivity, activity);
app_dict->SetString(kIntentUri, intent_uri);
@@ -738,9 +749,9 @@ void ArcAppListPrefs::AddAppAndShortcut(
OnAppReadyChanged(app_id, true));
}
} else {
- AppInfo app_info(name, package_name, activity, intent_uri, icon_resource_id,
- base::Time(), GetInstallTime(app_id), sticky,
- notifications_enabled, true,
+ AppInfo app_info(name_beta, package_name, activity, intent_uri,
+ icon_resource_id, base::Time(), GetInstallTime(app_id),
+ sticky, notifications_enabled, true,
launchable && arc::ShouldShowInLauncher(app_id), shortcut,
launchable, orientation_lock);
FOR_EACH_OBSERVER(Observer,

Powered by Google App Engine
This is Rietveld 408576698