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

Side by Side Diff: chrome/common/extensions/permissions/chrome_permission_message_rules.cc

Issue 2950203002: Add new permission string for extensions that override new tab pages. (Closed)
Patch Set: Devlin's last feedback. Created 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/permissions/chrome_permission_message_rules.h " 5 #include "chrome/common/extensions/permissions/chrome_permission_message_rules.h "
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 IDS_EXTENSION_PROMPT_WARNING_HOSTS_LIST), 371 IDS_EXTENSION_PROMPT_WARNING_HOSTS_LIST),
372 {APIPermission::kHostReadWrite}, 372 {APIPermission::kHostReadWrite},
373 {}}, 373 {}},
374 {new HostListFormatter(IDS_EXTENSION_PROMPT_WARNING_1_HOST_READ_ONLY, 374 {new HostListFormatter(IDS_EXTENSION_PROMPT_WARNING_1_HOST_READ_ONLY,
375 IDS_EXTENSION_PROMPT_WARNING_2_HOSTS_READ_ONLY, 375 IDS_EXTENSION_PROMPT_WARNING_2_HOSTS_READ_ONLY,
376 IDS_EXTENSION_PROMPT_WARNING_3_HOSTS_READ_ONLY, 376 IDS_EXTENSION_PROMPT_WARNING_3_HOSTS_READ_ONLY,
377 IDS_EXTENSION_PROMPT_WARNING_HOSTS_LIST_READ_ONLY), 377 IDS_EXTENSION_PROMPT_WARNING_HOSTS_LIST_READ_ONLY),
378 {APIPermission::kHostReadOnly}, 378 {APIPermission::kHostReadOnly},
379 {}}, 379 {}},
380 380
381 // New tab page permission is fairly highly used so rank it quite highly.
382 // Nothing should subsume it.
383 {IDS_EXTENSION_PROMPT_WARNING_NEW_TAB_PAGE_OVERRIDE,
384 {APIPermission::kNewTabPageOverride},
385 {}},
386
381 // History-related permission messages. 387 // History-related permission messages.
382 // History already allows reading favicons, tab access and accessing the 388 // History already allows reading favicons, tab access and accessing the
383 // list of most frequently visited sites. 389 // list of most frequently visited sites.
384 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_WRITE_AND_SESSIONS, 390 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_WRITE_AND_SESSIONS,
385 {APIPermission::kHistory, APIPermission::kSessions}, 391 {APIPermission::kHistory, APIPermission::kSessions},
386 {APIPermission::kFavicon, APIPermission::kProcesses, APIPermission::kTab, 392 {APIPermission::kFavicon, APIPermission::kProcesses, APIPermission::kTab,
387 APIPermission::kTopSites, APIPermission::kWebNavigation}}, 393 APIPermission::kTopSites, APIPermission::kWebNavigation}},
388 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_READ_AND_SESSIONS, 394 {IDS_EXTENSION_PROMPT_WARNING_HISTORY_READ_AND_SESSIONS,
389 {APIPermission::kTab, APIPermission::kSessions}, 395 {APIPermission::kTab, APIPermission::kSessions},
390 {APIPermission::kFavicon, APIPermission::kProcesses, 396 {APIPermission::kFavicon, APIPermission::kProcesses,
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 {IDS_EXTENSION_PROMPT_WARNING_DISPLAY_SOURCE, 645 {IDS_EXTENSION_PROMPT_WARNING_DISPLAY_SOURCE,
640 {APIPermission::kDisplaySource}, 646 {APIPermission::kDisplaySource},
641 {}}, 647 {}},
642 }; 648 };
643 649
644 return std::vector<ChromePermissionMessageRule>( 650 return std::vector<ChromePermissionMessageRule>(
645 rules_arr, rules_arr + arraysize(rules_arr)); 651 rules_arr, rules_arr + arraysize(rules_arr));
646 } 652 }
647 653
648 } // namespace extensions 654 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698