| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |