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

Side by Side Diff: chrome/common/extensions/api/url_handlers/url_handlers_parser.cc

Issue 23744004: Move the rest of extension_manifest_constants to top-level extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/common/extensions/api/url_handlers/url_handlers_parser.h" 5 #include "chrome/common/extensions/api/url_handlers/url_handlers_parser.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/common/extensions/extension_manifest_constants.h"
13 #include "chrome/common/extensions/manifest_handlers/offline_enabled_info.h" 12 #include "chrome/common/extensions/manifest_handlers/offline_enabled_info.h"
14 #include "extensions/common/error_utils.h" 13 #include "extensions/common/error_utils.h"
14 #include "extensions/common/manifest_constants.h"
15 #include "extensions/common/switches.h" 15 #include "extensions/common/switches.h"
16 #include "net/base/network_change_notifier.h" 16 #include "net/base/network_change_notifier.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 using base::ASCIIToUTF16; 19 using base::ASCIIToUTF16;
20 using net::NetworkChangeNotifier; 20 using net::NetworkChangeNotifier;
21 21
22 namespace mkeys = extensions::manifest_keys;
23 namespace merrors = extension_manifest_errors;
24
25 // TODO(sergeygs): Use the same strategy that externally_connectable does for 22 // TODO(sergeygs): Use the same strategy that externally_connectable does for
26 // parsing the manifest: declare a schema for the manifest entry in 23 // parsing the manifest: declare a schema for the manifest entry in
27 // manifest_types.json, then use it here. 24 // manifest_types.json, then use it here.
28 // 25 //
29 // See: 26 // See:
30 // chrome/common/extensions/api/manifest_types.json 27 // chrome/common/extensions/api/manifest_types.json
31 // chrome/common/extensions/manifest_handlers/externally_connectable.* 28 // chrome/common/extensions/manifest_handlers/externally_connectable.*
32 // 29 //
33 // Do the same in (at least) file_handlers_parser.cc as well. 30 // Do the same in (at least) file_handlers_parser.cc as well.
34 31
35 namespace extensions { 32 namespace extensions {
36 33
34 namespace mkeys = manifest_keys;
35 namespace merrors = manifest_errors;
36
37 UrlHandlerInfo::UrlHandlerInfo() { 37 UrlHandlerInfo::UrlHandlerInfo() {
38 } 38 }
39 39
40 UrlHandlerInfo::~UrlHandlerInfo() { 40 UrlHandlerInfo::~UrlHandlerInfo() {
41 } 41 }
42 42
43 UrlHandlers::UrlHandlers() { 43 UrlHandlers::UrlHandlers() {
44 } 44 }
45 45
46 UrlHandlers::~UrlHandlers() { 46 UrlHandlers::~UrlHandlers() {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 extension->SetManifestData(mkeys::kUrlHandlers, info.release()); 161 extension->SetManifestData(mkeys::kUrlHandlers, info.release());
162 162
163 return true; 163 return true;
164 } 164 }
165 165
166 const std::vector<std::string> UrlHandlersParser::Keys() const { 166 const std::vector<std::string> UrlHandlersParser::Keys() const {
167 return SingleKey(mkeys::kUrlHandlers); 167 return SingleKey(mkeys::kUrlHandlers);
168 } 168 }
169 169
170 } // namespace extensions 170 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/system_indicator/system_indicator_handler.cc ('k') | chrome/common/extensions/background_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698