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

Side by Side Diff: chrome/browser/extensions/api/management/management_api.cc

Issue 24365004: Add EXTERNAL_POLICY to list of possible extension locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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/browser/extensions/api/management/management_api.h" 5 #include "chrome/browser/extensions/api/management/management_api.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 break; 183 break;
184 case Manifest::UNPACKED: 184 case Manifest::UNPACKED:
185 case Manifest::COMMAND_LINE: 185 case Manifest::COMMAND_LINE:
186 info->install_type = management::ExtensionInfo::INSTALL_TYPE_DEVELOPMENT; 186 info->install_type = management::ExtensionInfo::INSTALL_TYPE_DEVELOPMENT;
187 break; 187 break;
188 case Manifest::EXTERNAL_PREF: 188 case Manifest::EXTERNAL_PREF:
189 case Manifest::EXTERNAL_REGISTRY: 189 case Manifest::EXTERNAL_REGISTRY:
190 case Manifest::EXTERNAL_PREF_DOWNLOAD: 190 case Manifest::EXTERNAL_PREF_DOWNLOAD:
191 info->install_type = management::ExtensionInfo::INSTALL_TYPE_SIDELOAD; 191 info->install_type = management::ExtensionInfo::INSTALL_TYPE_SIDELOAD;
192 break; 192 break;
193 case Manifest::EXTERNAL_POLICY:
193 case Manifest::EXTERNAL_POLICY_DOWNLOAD: 194 case Manifest::EXTERNAL_POLICY_DOWNLOAD:
194 info->install_type = management::ExtensionInfo::INSTALL_TYPE_ADMIN; 195 info->install_type = management::ExtensionInfo::INSTALL_TYPE_ADMIN;
195 break; 196 break;
196 default: 197 default:
not at google - send to devlin 2013/09/23 21:17:32 could you remove the default case here? it stops t
bartfab (slow) 2013/09/26 14:29:54 Done.
197 info->install_type = management::ExtensionInfo::INSTALL_TYPE_OTHER; 198 info->install_type = management::ExtensionInfo::INSTALL_TYPE_OTHER;
198 break; 199 break;
199 } 200 }
200 201
201 return info.Pass(); 202 return info.Pass();
202 } 203 }
203 204
204 void AddExtensionInfo(const ExtensionSet& extensions, 205 void AddExtensionInfo(const ExtensionSet& extensions,
205 ExtensionSystem* system, 206 ExtensionSystem* system,
206 ExtensionInfoList* extension_list) { 207 ExtensionInfoList* extension_list) {
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() { 718 ProfileKeyedAPIFactory<ManagementAPI>* ManagementAPI::GetFactoryInstance() {
718 return &g_factory.Get(); 719 return &g_factory.Get();
719 } 720 }
720 721
721 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) { 722 void ManagementAPI::OnListenerAdded(const EventListenerInfo& details) {
722 management_event_router_.reset(new ManagementEventRouter(profile_)); 723 management_event_router_.reset(new ManagementEventRouter(profile_));
723 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 724 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
724 } 725 }
725 726
726 } // namespace extensions 727 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698