From e317c9a117b6f365cd6e596dc7e4d1d1365f53a0 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Thu, 25 Mar 2010 22:02:44 +0000 Subject: Temporary stuff for internal plugins, part 1. BUG=none TEST=none Review URL: http://codereview.chromium.org/1320002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42674 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_init.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'chrome/browser/browser_init.cc') diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 4d45cdd..b4518d7 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -489,6 +489,23 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, std::vector urls_to_open = GetURLsFromCommandLine(profile_); RecordLaunchModeHistogram(urls_to_open.empty()? LM_TO_BE_DECIDED : LM_WITH_URLS); + + // TODO(viettrungluu): Temporary: Display a EULA before allowing the user to + // actually enable Flash, unless they've already accepted it. Process this + // in the same way as command-line URLs. + FilePath flash_path; + if (command_line_.HasSwitch(switches::kEnableInternalFlash) && + PathService::Get(chrome::FILE_FLASH_PLUGIN, &flash_path)) { + PrefService* prefs = profile->GetPrefs(); + // Check whether the EULA has previously been accepted, defaulting to + // "no". If it hasn't, display a page which links to the EULA, etc. (This + // pref is registered by the plugin service.) + if (!prefs->GetBoolean(prefs::kPluginsFlashAuthorized)) { + urls_to_open.push_back( + GURL(chrome::kChromeUIPluginsAuthorizeFlashPathURL)); + } + } + if (!process_startup || !OpenStartupURLs(urls_to_open)) { // Add the home page and any special first run URLs. Browser* browser = NULL; -- cgit v1.1