OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/extensions/external_pref_cache_loader.h" | 5 #include "chrome/browser/chromeos/extensions/external_pref_cache_loader.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 void ExternalPrefCacheLoader::StartLoading() { | 164 void ExternalPrefCacheLoader::StartLoading() { |
165 if (!cache_dispatcher_->RegisterExternalPrefCacheLoader( | 165 if (!cache_dispatcher_->RegisterExternalPrefCacheLoader( |
166 this, base_path_id_, profile_)) { | 166 this, base_path_id_, profile_)) { |
167 // ExternalCacheDispatcher doesn't know list of extensions load it. | 167 // ExternalCacheDispatcher doesn't know list of extensions load it. |
168 ExternalPrefLoader::StartLoading(); | 168 ExternalPrefLoader::StartLoading(); |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 void ExternalPrefCacheLoader::LoadFinished() { | 172 void ExternalPrefCacheLoader::LoadFinished() { |
173 // TODO(dzhioev): Remove "Tips & Tricks" app from default apps till M33. | |
174 if (!CommandLine::ForCurrentProcess()->HasSwitch( | |
175 switches::kDisableFirstRunUI) && | |
176 prefs_.get() && prefs_->HasKey(extension_misc::kTipsAndTricksAppId)) { | |
177 prefs_->Remove(extension_misc::kTipsAndTricksAppId, NULL); | |
178 } | |
179 cache_dispatcher_->UpdateExtensionsList(prefs_.Pass()); | 173 cache_dispatcher_->UpdateExtensionsList(prefs_.Pass()); |
180 } | 174 } |
181 | 175 |
182 } // namespace chromeos | 176 } // namespace chromeos |
OLD | NEW |