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

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

Issue 18854021: Making the extension permissions dialog scrollable, when needed (adding expandable sections for thi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Polishing Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 // Since this is called from multiple sources, and since the histogram macros 1017 // Since this is called from multiple sources, and since the histogram macros
1018 // use statics, we need to manually lookup the histogram ourselves. 1018 // use statics, we need to manually lookup the histogram ourselves.
1019 base::HistogramBase* counter = base::LinearHistogram::FactoryGet( 1019 base::HistogramBase* counter = base::LinearHistogram::FactoryGet(
1020 histogram, 1020 histogram,
1021 1, 1021 1,
1022 PermissionMessage::kEnumBoundary, 1022 PermissionMessage::kEnumBoundary,
1023 PermissionMessage::kEnumBoundary + 1, 1023 PermissionMessage::kEnumBoundary + 1,
1024 base::HistogramBase::kUmaTargetedHistogramFlag); 1024 base::HistogramBase::kUmaTargetedHistogramFlag);
1025 1025
1026 PermissionMessages permissions = 1026 PermissionMessages permissions =
1027 extensions::PermissionsData::GetPermissionMessages(extension); 1027 extensions::PermissionsData::GetPermissionMessages(extension, false);
1028 if (permissions.empty()) { 1028 if (permissions.empty()) {
1029 counter->Add(PermissionMessage::kNone); 1029 counter->Add(PermissionMessage::kNone);
1030 } else { 1030 } else {
1031 for (PermissionMessages::iterator it = permissions.begin(); 1031 for (PermissionMessages::iterator it = permissions.begin();
1032 it != permissions.end(); ++it) 1032 it != permissions.end(); ++it)
1033 counter->Add(it->id()); 1033 counter->Add(it->id());
1034 } 1034 }
1035 } 1035 }
1036 1036
1037 void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { 1037 void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3085 } 3085 }
3086 3086
3087 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 3087 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
3088 update_observers_.AddObserver(observer); 3088 update_observers_.AddObserver(observer);
3089 } 3089 }
3090 3090
3091 void ExtensionService::RemoveUpdateObserver( 3091 void ExtensionService::RemoveUpdateObserver(
3092 extensions::UpdateObserver* observer) { 3092 extensions::UpdateObserver* observer) {
3093 update_observers_.RemoveObserver(observer); 3093 update_observers_.RemoveObserver(observer);
3094 } 3094 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698