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

Unified Diff: chrome/browser/extensions/component_loader.cc

Issue 1740243003: Remove Now v1 component cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader.cc
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc
index d386f9d1741629985c4075206af7e60158c189d7..bedcde653f63699297ad283e57b7998ddbc8da58 100644
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -383,46 +383,6 @@ void ComponentLoader::AddNetworkSpeechSynthesisExtension() {
base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis")));
}
-void ComponentLoader::AddGoogleNowExtension() {
-#if BUILDFLAG(ENABLE_GOOGLE_NOW)
- const char kEnablePrefix[] = "Enable";
- const char kFieldTrialName[] = "GoogleNow";
- std::string enable_prefix(kEnablePrefix);
- std::string field_trial_result =
- base::FieldTrialList::FindFullName(kFieldTrialName);
-
- bool enabled_via_field_trial =
- field_trial_result.compare(0, enable_prefix.length(), enable_prefix) == 0;
-
- // Enable the feature on trybots and trunk builds.
- bool enabled_via_trunk_build =
- chrome::GetChannel() == version_info::Channel::UNKNOWN;
-
- bool is_authenticated =
- SigninManagerFactory::GetForProfile(profile_)->IsAuthenticated();
-
- bool enabled =
- (enabled_via_field_trial && is_authenticated) || enabled_via_trunk_build;
-
-#if defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS)
- // Don't load if newer trial is running (== new extension id is available).
- std::string ignored_extension_id;
- if (GetGoogleNowExtensionId(&ignored_extension_id)) {
- enabled = false;
- }
-#endif // defined(ENABLE_APP_LIST) && defined(OS_CHROMEOS)
-
- const int google_now_manifest_id = IDR_GOOGLE_NOW_MANIFEST;
- const base::FilePath root_directory =
- base::FilePath(FILE_PATH_LITERAL("google_now"));
- if (enabled) {
- Add(google_now_manifest_id, root_directory);
- } else {
- DeleteData(google_now_manifest_id, root_directory);
- }
-#endif // BUILDFLAG(ENABLE_GOOGLE_NOW)
-}
-
#if defined(OS_CHROMEOS)
void ComponentLoader::AddChromeVoxExtension(
const base::Closure& done_cb) {
@@ -633,7 +593,6 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages(
AddHotwordAudioVerificationApp();
AddHotwordHelperExtension();
AddImageLoaderExtension();
- AddGoogleNowExtension();
bool install_feedback = enable_background_extensions_during_testing;
#if defined(GOOGLE_CHROME_BUILD)
« no previous file with comments | « chrome/browser/extensions/component_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698