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

Side by Side Diff: chrome/common/extensions/extension_permission_set.cc

Issue 8922014: Don't delay network requests for webNavigation, and re-enable the permission warning (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
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/common/extensions/extension_permission_set.h" 5 #include "chrome/common/extensions/extension_permission_set.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, 264 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS,
265 ExtensionPermissionMessage::kTabs, kFlagSupportsOptional, 265 ExtensionPermissionMessage::kTabs, kFlagSupportsOptional,
266 kTypeDefault - kTypePlatformApp); 266 kTypeDefault - kTypePlatformApp);
267 info->RegisterPermission( 267 info->RegisterPermission(
268 kTts, "tts", 0, 268 kTts, "tts", 0,
269 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault); 269 ExtensionPermissionMessage::kNone, kFlagNone, kTypeDefault);
270 info->RegisterPermission( 270 info->RegisterPermission(
271 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, 271 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE,
272 ExtensionPermissionMessage::kTtsEngine, kFlagNone, kTypeDefault); 272 ExtensionPermissionMessage::kTtsEngine, kFlagNone, kTypeDefault);
273 info->RegisterPermission( 273 info->RegisterPermission(
274 kWebNavigation, "webNavigation", 0, 274 kWebNavigation, "webNavigation",
275 ExtensionPermissionMessage::kNone, kFlagSupportsOptional, 275 IDS_EXTENSION_PROMPT_WARNING_TABS,
276 ExtensionPermissionMessage::kTabs, kFlagSupportsOptional,
276 kTypeDefault - kTypePlatformApp); 277 kTypeDefault - kTypePlatformApp);
277 info->RegisterPermission( 278 info->RegisterPermission(
278 kWebRequest, "webRequest", 0, 279 kWebRequest, "webRequest", 0,
279 ExtensionPermissionMessage::kNone, kFlagSupportsOptional, 280 ExtensionPermissionMessage::kNone, kFlagSupportsOptional,
280 kTypeDefault - kTypePlatformApp); 281 kTypeDefault - kTypePlatformApp);
281 info->RegisterPermission( 282 info->RegisterPermission(
282 kWebRequestBlocking, "webRequestBlocking", 0, 283 kWebRequestBlocking, "webRequestBlocking", 0,
283 ExtensionPermissionMessage::kNone, kFlagSupportsOptional, 284 ExtensionPermissionMessage::kNone, kFlagSupportsOptional,
284 kTypeDefault - kTypePlatformApp); 285 kTypeDefault - kTypePlatformApp);
285 info->RegisterPermission( 286 info->RegisterPermission(
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 859 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
859 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 860 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
860 std::set<std::string> new_hosts_only; 861 std::set<std::string> new_hosts_only;
861 862
862 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 863 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
863 old_hosts_set.begin(), old_hosts_set.end(), 864 old_hosts_set.begin(), old_hosts_set.end(),
864 std::inserter(new_hosts_only, new_hosts_only.begin())); 865 std::inserter(new_hosts_only, new_hosts_only.begin()));
865 866
866 return !new_hosts_only.empty(); 867 return !new_hosts_only.empty();
867 } 868 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698