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

Side by Side Diff: chrome/common/extensions/features/feature.cc

Issue 10782030: Add content pack information to Extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/features/feature.h" 5 #include "chrome/common/extensions/features/feature.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 13
14 using chrome::VersionInfo; 14 using chrome::VersionInfo;
15 using extensions::Extension; 15 using extensions::Extension;
16 16
17 namespace { 17 namespace {
18 18
19 struct Mappings { 19 struct Mappings {
20 Mappings() { 20 Mappings() {
21 extension_types["extension"] = Extension::TYPE_EXTENSION; 21 extension_types["extension"] = Extension::TYPE_EXTENSION;
22 extension_types["theme"] = Extension::TYPE_THEME; 22 extension_types["theme"] = Extension::TYPE_THEME;
23 extension_types["packaged_app"] = Extension::TYPE_PACKAGED_APP; 23 extension_types["packaged_app"] = Extension::TYPE_PACKAGED_APP;
24 extension_types["hosted_app"] = Extension::TYPE_HOSTED_APP; 24 extension_types["hosted_app"] = Extension::TYPE_HOSTED_APP;
25 extension_types["platform_app"] = Extension::TYPE_PLATFORM_APP; 25 extension_types["platform_app"] = Extension::TYPE_PLATFORM_APP;
26 extension_types["content_pack"] = Extension::TYPE_CONTENT_PACK;
26 27
27 contexts["blessed_extension"] = 28 contexts["blessed_extension"] =
28 extensions::Feature::BLESSED_EXTENSION_CONTEXT; 29 extensions::Feature::BLESSED_EXTENSION_CONTEXT;
29 contexts["unblessed_extension"] = 30 contexts["unblessed_extension"] =
30 extensions::Feature::UNBLESSED_EXTENSION_CONTEXT; 31 extensions::Feature::UNBLESSED_EXTENSION_CONTEXT;
31 contexts["content_script"] = extensions::Feature::CONTENT_SCRIPT_CONTEXT; 32 contexts["content_script"] = extensions::Feature::CONTENT_SCRIPT_CONTEXT;
32 contexts["web_page"] = extensions::Feature::WEB_PAGE_CONTEXT; 33 contexts["web_page"] = extensions::Feature::WEB_PAGE_CONTEXT;
33 34
34 locations["component"] = extensions::Feature::COMPONENT_LOCATION; 35 locations["component"] = extensions::Feature::COMPONENT_LOCATION;
35 36
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 chrome::VersionInfo::Channel Feature::GetCurrentChannel() { 329 chrome::VersionInfo::Channel Feature::GetCurrentChannel() {
329 return g_current_channel; 330 return g_current_channel;
330 } 331 }
331 332
332 // static 333 // static
333 void Feature::SetCurrentChannel(VersionInfo::Channel channel) { 334 void Feature::SetCurrentChannel(VersionInfo::Channel channel) {
334 g_current_channel = channel; 335 g_current_channel = channel;
335 } 336 }
336 337
337 } // namespace 338 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698