OLD | NEW |
---|---|
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/browser/ui/page_info/page_info_ui.h" | 5 #include "chrome/browser/ui/page_info/page_info_ui.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
332 switch (permission_result.source) { | 332 switch (permission_result.source) { |
333 case PermissionStatusSource::MULTIPLE_DISMISSALS: | 333 case PermissionStatusSource::MULTIPLE_DISMISSALS: |
334 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: | 334 case PermissionStatusSource::SAFE_BROWSING_BLACKLIST: |
335 message_id = IDS_PAGE_INFO_PERMISSION_AUTOMATICALLY_BLOCKED; | 335 message_id = IDS_PAGE_INFO_PERMISSION_AUTOMATICALLY_BLOCKED; |
336 break; | 336 break; |
337 default: | 337 default: |
338 break; | 338 break; |
339 } | 339 } |
340 } | 340 } |
341 | 341 |
342 if (permission.type == CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER) { | |
343 message_id = IDS_PAGE_INFO_PERMISSION_SUBRESOURCE_FILTER_SUBTITLE; | |
344 } | |
raymes
2017/05/15 23:15:50
nit: no {}
Charlie Harrison
2017/05/16 00:42:41
Done.
| |
345 | |
342 if (message_id == kInvalidResourceID) | 346 if (message_id == kInvalidResourceID) |
343 return base::string16(); | 347 return base::string16(); |
344 return l10n_util::GetStringUTF16(message_id); | 348 return l10n_util::GetStringUTF16(message_id); |
345 } | 349 } |
346 | 350 |
347 // static | 351 // static |
348 SkColor PageInfoUI::GetPermissionDecisionTextColor() { | 352 SkColor PageInfoUI::GetPermissionDecisionTextColor() { |
349 return SK_ColorGRAY; | 353 return SK_ColorGRAY; |
350 } | 354 } |
351 | 355 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 const gfx::ImageSkia PageInfoUI::GetCertificateIcon() { | 442 const gfx::ImageSkia PageInfoUI::GetCertificateIcon() { |
439 return gfx::CreateVectorIcon(kCertificateIcon, 16, gfx::kChromeIconGrey); | 443 return gfx::CreateVectorIcon(kCertificateIcon, 16, gfx::kChromeIconGrey); |
440 } | 444 } |
441 #endif | 445 #endif |
442 | 446 |
443 // static | 447 // static |
444 bool PageInfoUI::ShouldShowCertificateLink() { | 448 bool PageInfoUI::ShouldShowCertificateLink() { |
445 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 449 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
446 switches::kShowCertLink); | 450 switches::kShowCertLink); |
447 } | 451 } |
OLD | NEW |