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

Side by Side Diff: chrome/browser/extensions/extension_management_api.cc

Issue 8789018: Revert 113047 - Make ExtensionService use ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/extension_management_api.h" 5 #include "chrome/browser/extensions/extension_management_api.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 host_permission_list->Append(name); 116 host_permission_list->Append(name);
117 } 117 }
118 } 118 }
119 } 119 }
120 info->Set("hostPermissions", host_permission_list); 120 info->Set("hostPermissions", host_permission_list);
121 121
122 return info; 122 return info;
123 } 123 }
124 124
125 static void AddExtensionInfo(ListValue* list, 125 static void AddExtensionInfo(ListValue* list,
126 const ExtensionSet& extensions, 126 const ExtensionList& extensions,
127 bool enabled, 127 bool enabled,
128 ExtensionPrefs* prefs) { 128 ExtensionPrefs* prefs) {
129 for (ExtensionSet::const_iterator i = extensions.begin(); 129 for (ExtensionList::const_iterator i = extensions.begin();
130 i != extensions.end(); ++i) { 130 i != extensions.end(); ++i) {
131 const Extension& extension = **i; 131 const Extension& extension = **i;
132 132
133 if (extension.location() == Extension::COMPONENT) 133 if (extension.location() == Extension::COMPONENT)
134 continue; // Skip built-in extensions. 134 continue; // Skip built-in extensions.
135 135
136 bool escalated = 136 bool escalated =
137 prefs->DidExtensionEscalatePermissions(extension.id()); 137 prefs->DidExtensionEscalatePermissions(extension.id());
138 list->Append(CreateExtensionInfo(extension, enabled, escalated)); 138 list->Append(CreateExtensionInfo(extension, enabled, escalated));
139 } 139 }
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 bool escalated = prefs ->DidExtensionEscalatePermissions(extension->id()); 508 bool escalated = prefs ->DidExtensionEscalatePermissions(extension->id());
509 args.Append(CreateExtensionInfo(*extension, enabled, escalated)); 509 args.Append(CreateExtensionInfo(*extension, enabled, escalated));
510 } 510 }
511 511
512 std::string args_json; 512 std::string args_json;
513 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json); 513 base::JSONWriter::Write(&args, false /* pretty_print */, &args_json);
514 514
515 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 515 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
516 event_name, args_json, NULL, GURL()); 516 event_name, args_json, NULL, GURL());
517 } 517 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_info_map.cc ('k') | chrome/browser/extensions/extension_management_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698