summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 22:02:44 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-25 22:02:44 +0000
commite317c9a117b6f365cd6e596dc7e4d1d1365f53a0 (patch)
tree55e6a2dfe29972c3996d31a14dbba24a061f55fd /chrome/browser/browser_init.cc
parent7ae80749da2e8caa8155984be0970ac20a42a04a (diff)
downloadchromium_src-e317c9a117b6f365cd6e596dc7e4d1d1365f53a0.zip
chromium_src-e317c9a117b6f365cd6e596dc7e4d1d1365f53a0.tar.gz
chromium_src-e317c9a117b6f365cd6e596dc7e4d1d1365f53a0.tar.bz2
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
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc17
1 files changed, 17 insertions, 0 deletions
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<GURL> 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;