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

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

Issue 9721013: Move topSites API out of experimental (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved topSites API out of experimental Created 8 years, 9 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
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/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/command_line.h" 10 #include "base/command_line.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 info->RegisterPermission( 248 info->RegisterPermission(
249 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY, 249 kPrivacy, "privacy", IDS_EXTENSION_PROMPT_WARNING_PRIVACY,
250 ExtensionPermissionMessage::kPrivacy, kFlagNone); 250 ExtensionPermissionMessage::kPrivacy, kFlagNone);
251 info->RegisterPermission( 251 info->RegisterPermission(
252 kStorage, "storage", 0, 252 kStorage, "storage", 0,
253 ExtensionPermissionMessage::kNone, kFlagNone); 253 ExtensionPermissionMessage::kNone, kFlagNone);
254 info->RegisterPermission( 254 info->RegisterPermission(
255 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS, 255 kTab, "tabs", IDS_EXTENSION_PROMPT_WARNING_TABS,
256 ExtensionPermissionMessage::kTabs, kFlagNone); 256 ExtensionPermissionMessage::kTabs, kFlagNone);
257 info->RegisterPermission( 257 info->RegisterPermission(
258 kTopSites, "topSites", 0,
259 ExtensionPermissionMessage::kNone, kFlagNone);
260 info->RegisterPermission(
258 kTts, "tts", 0, 261 kTts, "tts", 0,
259 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional); 262 ExtensionPermissionMessage::kNone, kFlagCannotBeOptional);
260 info->RegisterPermission( 263 info->RegisterPermission(
261 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE, 264 kTtsEngine, "ttsEngine", IDS_EXTENSION_PROMPT_WARNING_TTS_ENGINE,
262 ExtensionPermissionMessage::kTtsEngine, 265 ExtensionPermissionMessage::kTtsEngine,
263 kFlagCannotBeOptional); 266 kFlagCannotBeOptional);
264 info->RegisterPermission( 267 info->RegisterPermission(
265 kWebNavigation, "webNavigation", 268 kWebNavigation, "webNavigation",
266 IDS_EXTENSION_PROMPT_WARNING_TABS, ExtensionPermissionMessage::kTabs, 269 IDS_EXTENSION_PROMPT_WARNING_TABS, ExtensionPermissionMessage::kTabs,
267 kFlagNone); 270 kFlagNone);
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false)); 866 std::set<std::string> new_hosts_set(GetDistinctHosts(new_list, false, false));
864 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false)); 867 std::set<std::string> old_hosts_set(GetDistinctHosts(old_list, false, false));
865 std::set<std::string> new_hosts_only; 868 std::set<std::string> new_hosts_only;
866 869
867 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(), 870 std::set_difference(new_hosts_set.begin(), new_hosts_set.end(),
868 old_hosts_set.begin(), old_hosts_set.end(), 871 old_hosts_set.begin(), old_hosts_set.end(),
869 std::inserter(new_hosts_only, new_hosts_only.begin())); 872 std::inserter(new_hosts_only, new_hosts_only.begin()));
870 873
871 return !new_hosts_only.empty(); 874 return !new_hosts_only.empty();
872 } 875 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698