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

Unified Diff: extensions/common/manifest_handlers/options_page_info.cc

Issue 667453003: First stage of launch for embedded options pages. With this patch, extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 | « extensions/browser/guest_view/extension_options/extension_options_guest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/manifest_handlers/options_page_info.cc
diff --git a/extensions/common/manifest_handlers/options_page_info.cc b/extensions/common/manifest_handlers/options_page_info.cc
index e669f0c49fae15e53611fee62181deddf4c9d6a2..efcff839765cb21ed83b935209fdf06b7e07f84f 100644
--- a/extensions/common/manifest_handlers/options_page_info.cc
+++ b/extensions/common/manifest_handlers/options_page_info.cc
@@ -111,12 +111,14 @@ scoped_ptr<OptionsPageInfo> OptionsPageInfo::Create(
std::vector<InstallWarning>* install_warnings,
base::string16* error) {
GURL options_page;
+ // Chrome styling is always opt-in.
bool chrome_style = false;
+ // Extensions can opt in or out to opening in a tab, and users can choose via
+ // the --embedded-extension-options flag which should be the default.
bool open_in_tab = !FeatureSwitch::embedded_extension_options()->IsEnabled();
// Parse the options_ui object.
- if (options_ui_value &&
- FeatureSwitch::embedded_extension_options()->IsEnabled()) {
+ if (options_ui_value) {
base::string16 options_ui_error;
scoped_ptr<OptionsUI> options_ui =
@@ -140,9 +142,10 @@ scoped_ptr<OptionsPageInfo> OptionsPageInfo::Create(
install_warnings->push_back(
InstallWarning(base::UTF16ToASCII(options_parse_error)));
}
- chrome_style =
- options_ui->chrome_style.get() && *options_ui->chrome_style;
- open_in_tab = options_ui->open_in_tab.get() && *options_ui->open_in_tab;
+ if (options_ui->chrome_style.get())
+ chrome_style = *options_ui->chrome_style;
+ if (options_ui->open_in_tab.get())
+ open_in_tab = *options_ui->open_in_tab;
}
}
« no previous file with comments | « extensions/browser/guest_view/extension_options/extension_options_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698