Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 405502 Details for
Bug 552298
>=www-client/chromium-43.0.2357.65 add opt-out of chrome hotword shared module
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Upstream changeset
chromium-hotwording-r0.patch (text/plain), 5.02 KB, created by
Mike Gilbert
on 2015-06-21 20:34:15 UTC
(
hide
)
Description:
Upstream changeset
Filename:
MIME Type:
Creator:
Mike Gilbert
Created:
2015-06-21 20:34:15 UTC
Size:
5.02 KB
patch
obsolete
>From f269d3b548203e217e8c0080c2e22e7ae3efb51e Mon Sep 17 00:00:00 2001 >From: amistry <amistry@chromium.org> >Date: Tue, 9 Jun 2015 12:18:39 -0700 >Subject: [PATCH] Add build flag to disable hotwording. > >Hotwording downloads a shared module from the web store containing a NaCl module. There is a desire to build and distribute Chromium without this happening. This change adds an "enable_hotwording" build flag that is enabled by default, but can be disabled at compile time. > >BUG=491435 > >Review URL: https://codereview.chromium.org/1160243004 > >Cr-Commit-Position: refs/heads/master@{#333548} >--- > build/common.gypi | 4 ++++ > chrome/browser/BUILD.gn | 9 +++++++++ > chrome/browser/search/hotword_service.cc | 4 ++++ > chrome/browser/search/hotword_service_unittest.cc | 4 ++++ > chrome/chrome_browser.gypi | 3 +++ > 5 files changed, 24 insertions(+) > >diff --git a/build/common.gypi b/build/common.gypi >index 6e8f853..02dd63e 100644 >--- a/build/common.gypi >+++ b/build/common.gypi >@@ -416,6 +416,9 @@ > # Web speech is enabled by default. Set to 0 to disable. > 'enable_web_speech%': 1, > >+ # 'Ok Google' hotwording is enabled by default. Set to 0 to disable. >+ 'enable_hotwording%': 1, >+ > # Notifications are compiled in by default. Set to 0 to disable. > 'notifications%' : 1, > >@@ -1143,6 +1146,7 @@ > 'configuration_policy%': '<(configuration_policy)', > 'safe_browsing%': '<(safe_browsing)', > 'enable_web_speech%': '<(enable_web_speech)', >+ 'enable_hotwording%': '<(enable_hotwording)', > 'notifications%': '<(notifications)', > 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', > 'mac_want_real_dsym%': '<(mac_want_real_dsym)', >diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn >index 74971e6..18e43ec 100644 >--- a/chrome/browser/BUILD.gn >+++ b/chrome/browser/BUILD.gn >@@ -19,6 +19,11 @@ if (is_desktop_linux) { > import("//build/config/linux/pkg_config.gni") > } > >+declare_args() { >+ # 'Ok Google' hotwording is enabled. >+ enable_hotwording = true >+} >+ > about_credits_file = "$target_gen_dir/about_credits.html" > additional_modules_list_file = > "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" >@@ -452,6 +457,10 @@ source_set("browser") { > } > } > >+ if (enable_hotwording) { >+ defines += [ "ENABLE_HOTWORDING" ] >+ } >+ > if (is_linux) { > deps += [ > "//device/media_transfer_protocol", >diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc >index d222b15..5b08027 100644 >--- a/chrome/browser/search/hotword_service.cc >+++ b/chrome/browser/search/hotword_service.cc >@@ -639,7 +639,11 @@ bool HotwordService::IsServiceAvailable() { > } > > bool HotwordService::IsHotwordAllowed() { >+#if defined(ENABLE_HOTWORDING) > return DoesHotwordSupportLanguage(profile_); >+#else >+ return false; >+#endif > } > > bool HotwordService::IsOptedIntoAudioLogging() { >diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc >index 588706c..8444446 100644 >--- a/chrome/browser/search/hotword_service_unittest.cc >+++ b/chrome/browser/search/hotword_service_unittest.cc >@@ -157,6 +157,7 @@ INSTANTIATE_TEST_CASE_P(HotwordServiceTests, > extension_misc::kHotwordSharedModuleId)); > > TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { >+#if defined(ENABLE_HOTWORDING) > TestingProfile::Builder profile_builder; > scoped_ptr<TestingProfile> profile = profile_builder.Build(); > >@@ -187,6 +188,7 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { > Profile* otr_profile = profile->GetOffTheRecordProfile(); > SetApplicationLocale(otr_profile, "en"); > EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile)); >+#endif // defined(ENABLE_HOTWORDING) > } > > TEST_P(HotwordServiceTest, ShouldReinstallExtension) { >@@ -243,6 +245,7 @@ TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) { > } > > TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { >+#if defined(ENABLE_HOTWORDING) > InitializeEmptyExtensionService(); > service_->Init(); > >@@ -313,6 +316,7 @@ TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { > EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile())); > EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension()); > EXPECT_EQ(1, hotword_service->uninstall_count()); // no change >+#endif // defined(ENABLE_HOTWORDING) > } > > TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) { >diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi >index 5ba1538..9f22a44 100644 >--- a/chrome/chrome_browser.gypi >+++ b/chrome/chrome_browser.gypi >@@ -3589,6 +3589,9 @@ > ['enable_session_service==1', { > 'sources': [ '<@(chrome_browser_session_service_sources)' ], > }], >+ ['enable_hotwording==1', { >+ 'defines': [ 'ENABLE_HOTWORDING' ], >+ }], > ['OS!="android" and OS!="ios" and chromeos==0', { > 'sources': [ '<@(chrome_browser_desktop_sources)' ], > }], >-- >2.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 552298
: 405502 |
405504