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

Side by Side Diff: extensions/common/manifest_handlers/options_page_info.cc

Issue 670623004: Make the default value of open-in-tab false when the options_ui key is given. (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 unified diff | Download patch
« no previous file with comments | « chrome/common/extensions/manifest_tests/extension_manifests_options_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/common/manifest_handlers/options_page_info.h" 5 #include "extensions/common/manifest_handlers/options_page_info.h"
6 6
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "extensions/common/api/extensions_manifest_types.h" 10 #include "extensions/common/api/extensions_manifest_types.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 if (!ParseOptionsUrl(extension, 137 if (!ParseOptionsUrl(extension,
138 options_ui->page, 138 options_ui->page,
139 keys::kOptionsUI, 139 keys::kOptionsUI,
140 &options_parse_error, 140 &options_parse_error,
141 &options_page)) { 141 &options_page)) {
142 install_warnings->push_back( 142 install_warnings->push_back(
143 InstallWarning(base::UTF16ToASCII(options_parse_error))); 143 InstallWarning(base::UTF16ToASCII(options_parse_error)));
144 } 144 }
145 if (options_ui->chrome_style.get()) 145 if (options_ui->chrome_style.get())
146 chrome_style = *options_ui->chrome_style; 146 chrome_style = *options_ui->chrome_style;
147 open_in_tab = false;
147 if (options_ui->open_in_tab.get()) 148 if (options_ui->open_in_tab.get())
148 open_in_tab = *options_ui->open_in_tab; 149 open_in_tab = *options_ui->open_in_tab;
149 } 150 }
150 } 151 }
151 152
152 // Parse the legacy options_page entry if there was no entry for 153 // Parse the legacy options_page entry if there was no entry for
153 // options_ui.page. 154 // options_ui.page.
154 if (!options_page_string.empty() && !options_page.is_valid()) { 155 if (!options_page_string.empty() && !options_page.is_valid()) {
155 if (!ParseOptionsUrl(extension, 156 if (!ParseOptionsUrl(extension,
156 options_page_string, 157 options_page_string,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 221 }
221 return true; 222 return true;
222 } 223 }
223 224
224 const std::vector<std::string> OptionsPageManifestHandler::Keys() const { 225 const std::vector<std::string> OptionsPageManifestHandler::Keys() const {
225 static const char* keys[] = {keys::kOptionsPage, keys::kOptionsUI}; 226 static const char* keys[] = {keys::kOptionsPage, keys::kOptionsUI};
226 return std::vector<std::string>(keys, keys + arraysize(keys)); 227 return std::vector<std::string>(keys, keys + arraysize(keys));
227 } 228 }
228 229
229 } // namespace extensions 230 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/manifest_tests/extension_manifests_options_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698