summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-25 11:23:37 +0000
committerdzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-25 11:23:37 +0000
commite384a9f49236dde1d889fd0fc48e67f38fdffcc0 (patch)
tree2dbd49346f86cc3241e2445aa730b59736ac85cb /chrome/browser
parent48d2c73c2d1ce273289f1fcd9a1d454aed824c97 (diff)
downloadchromium_src-e384a9f49236dde1d889fd0fc48e67f38fdffcc0.zip
chromium_src-e384a9f49236dde1d889fd0fc48e67f38fdffcc0.tar.gz
chromium_src-e384a9f49236dde1d889fd0fc48e67f38fdffcc0.tar.bz2
First-run UI is enabled by default.
UI could be disabled by --disable-first-run-ui flag. Suppresed loading of "Tips & Tricks" app in case when first-run UI is enabled. BUG=269286 TBR=finnur for extension_constants.* Review URL: https://codereview.chromium.org/85293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/chromeos/extensions/default_app_order.cc2
-rw-r--r--chrome/browser/chromeos/extensions/external_pref_cache_loader.cc9
-rw-r--r--chrome/browser/chromeos/login/login_display_host_impl.cc11
4 files changed, 20 insertions, 10 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 6309c4e..1fe35e2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1745,11 +1745,11 @@ const Experiment kExperiments[] = {
},
#if defined(OS_CHROMEOS)
{
- "enable-first-run-ui",
- IDS_FLAGS_ENABLE_FIRST_RUN_UI_NAME,
- IDS_FLAGS_ENABLE_FIRST_RUN_UI_DESCRIPTION,
+ "disable-first-run-ui",
+ IDS_FLAGS_DISABLE_FIRST_RUN_UI_NAME,
+ IDS_FLAGS_DISABLE_FIRST_RUN_UI_DESCRIPTION,
kOsCrOS,
- SINGLE_VALUE_TYPE(chromeos::switches::kEnableFirstRunUI)
+ SINGLE_VALUE_TYPE(chromeos::switches::kDisableFirstRunUI)
},
#endif
{
diff --git a/chrome/browser/chromeos/extensions/default_app_order.cc b/chrome/browser/chromeos/extensions/default_app_order.cc
index ac88f72..af9b9ca 100644
--- a/chrome/browser/chromeos/extensions/default_app_order.cc
+++ b/chrome/browser/chromeos/extensions/default_app_order.cc
@@ -67,7 +67,7 @@ void GetDefault(std::vector<std::string>* app_ids) {
"dlppkpafhbajpcmmoheippocdidnckmm", // Google+
"kbpgddbgniojgndnhlkjbkpknjhppkbk", // Google+ Hangouts
"hhaomjibdihmijegdhdafkllkbggdgoj", // Files
- "hkhhlkdconhgemhegnplaldnmnmkaemd", // Tips & Tricks
+ extension_misc::kTipsAndTricksAppId,
extension_misc::kGooglePlayMusicAppId,
"mmimngoggfoobjdlefbcabngfnmieonb", // Play Books
"fppdphmgcddhjeddoeghpjefkdlccljb", // Play Movies
diff --git a/chrome/browser/chromeos/extensions/external_pref_cache_loader.cc b/chrome/browser/chromeos/extensions/external_pref_cache_loader.cc
index 55e2db5..b585446 100644
--- a/chrome/browser/chromeos/extensions/external_pref_cache_loader.cc
+++ b/chrome/browser/chromeos/extensions/external_pref_cache_loader.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/command_line.h"
#include "base/memory/ref_counted.h"
#include "base/sequenced_task_runner.h"
#include "base/threading/sequenced_worker_pool.h"
@@ -19,6 +20,8 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/extensions/extension_constants.h"
+#include "chromeos/chromeos_switches.h"
#include "content/public/browser/browser_thread.h"
namespace chromeos {
@@ -167,6 +170,12 @@ void ExternalPrefCacheLoader::StartLoading() {
}
void ExternalPrefCacheLoader::LoadFinished() {
+ // TODO(dzhioev): Remove "Tips & Tricks" app from default apps till M33.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableFirstRunUI) &&
+ prefs_.get() && prefs_->HasKey(extension_misc::kTipsAndTricksAppId)) {
+ prefs_->Remove(extension_misc::kTipsAndTricksAppId, NULL);
+ }
cache_dispatcher_->UpdateExtensionsList(prefs_.Pass());
}
diff --git a/chrome/browser/chromeos/login/login_display_host_impl.cc b/chrome/browser/chromeos/login/login_display_host_impl.cc
index e81e1ef..97432c7 100644
--- a/chrome/browser/chromeos/login/login_display_host_impl.cc
+++ b/chrome/browser/chromeos/login/login_display_host_impl.cc
@@ -53,6 +53,7 @@
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_constants.h"
#include "chromeos/chromeos_switches.h"
@@ -365,11 +366,11 @@ LoginDisplayHostImpl::~LoginDisplayHostImpl() {
default_host_ = NULL;
// TODO(dzhioev): find better place for starting tutorial.
- if (CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kEnableFirstRunUI) &&
- (chromeos::UserManager::Get()->IsCurrentUserNew() ||
- CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kForceFirstRunUI))) {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(switches::kDisableFirstRunUI) &&
+ ((chromeos::UserManager::Get()->IsCurrentUserNew() &&
+ !command_line->HasSwitch(::switches::kTestType)) ||
+ command_line->HasSwitch(switches::kForceFirstRunUI))) {
// FirstRunController manages its lifetime and destructs after tutorial
// completion.
FirstRunController::Start();