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

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

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
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"
11 #include "extensions/common/error_utils.h" 11 #include "extensions/common/error_utils.h"
12 #include "extensions/common/feature_switch.h" 12 #include "extensions/common/feature_switch.h"
13 #include "extensions/common/file_util.h" 13 #include "extensions/common/file_util.h"
14 #include "extensions/common/manifest_constants.h" 14 #include "extensions/common/manifest_constants.h"
15 #include "extensions/strings/grit/extensions_strings.h" 15 #include "extensions/strings/grit/extensions_strings.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 17
18 using base::ASCIIToUTF16; 18 using base::ASCIIToUTF16;
19 using base::DictionaryValue; 19 using base::DictionaryValue;
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 namespace keys = manifest_keys; 23 namespace keys = manifest_keys;
24 namespace errors = manifest_errors; 24 namespace errors = manifest_errors;
25 25
26 using core_api::extensions_manifest_types::OptionsUI; 26 using api::extensions_manifest_types::OptionsUI;
27 27
28 namespace { 28 namespace {
29 29
30 OptionsPageInfo* GetOptionsPageInfo(const Extension* extension) { 30 OptionsPageInfo* GetOptionsPageInfo(const Extension* extension) {
31 return static_cast<OptionsPageInfo*>( 31 return static_cast<OptionsPageInfo*>(
32 extension->GetManifestData(keys::kOptionsUI)); 32 extension->GetManifestData(keys::kOptionsUI));
33 } 33 }
34 34
35 // Parses |url_string| into a GURL |result| if it is a valid options page for 35 // Parses |url_string| into a GURL |result| if it is a valid options page for
36 // this app/extension. If not, it returns the reason in |error|. Because this 36 // this app/extension. If not, it returns the reason in |error|. Because this
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 return true; 222 return true;
223 } 223 }
224 224
225 const std::vector<std::string> OptionsPageManifestHandler::Keys() const { 225 const std::vector<std::string> OptionsPageManifestHandler::Keys() const {
226 static const char* keys[] = {keys::kOptionsPage, keys::kOptionsUI}; 226 static const char* keys[] = {keys::kOptionsPage, keys::kOptionsUI};
227 return std::vector<std::string>(keys, keys + arraysize(keys)); 227 return std::vector<std::string>(keys, keys + arraysize(keys));
228 } 228 }
229 229
230 } // namespace extensions 230 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/manifest_handlers/externally_connectable.cc ('k') | extensions/shell/browser/shell_display_info_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698