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 |
342 if (message_id == kInvalidResourceID) | 345 if (message_id == kInvalidResourceID) |
343 return base::string16(); | 346 return base::string16(); |
344 return l10n_util::GetStringUTF16(message_id); | 347 return l10n_util::GetStringUTF16(message_id); |
345 } | 348 } |
346 | 349 |
347 // static | 350 // static |
348 SkColor PageInfoUI::GetPermissionDecisionTextColor() { | 351 SkColor PageInfoUI::GetPermissionDecisionTextColor() { |
349 return SK_ColorGRAY; | 352 return SK_ColorGRAY; |
350 } | 353 } |
351 | 354 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 const gfx::ImageSkia PageInfoUI::GetCertificateIcon() { | 441 const gfx::ImageSkia PageInfoUI::GetCertificateIcon() { |
439 return gfx::CreateVectorIcon(kCertificateIcon, 16, gfx::kChromeIconGrey); | 442 return gfx::CreateVectorIcon(kCertificateIcon, 16, gfx::kChromeIconGrey); |
440 } | 443 } |
441 #endif | 444 #endif |
442 | 445 |
443 // static | 446 // static |
444 bool PageInfoUI::ShouldShowCertificateLink() { | 447 bool PageInfoUI::ShouldShowCertificateLink() { |
445 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 448 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
446 switches::kShowCertLink); | 449 switches::kShowCertLink); |
447 } | 450 } |
OLD | NEW |