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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 13483010: Add UI notifications for admin-provided SSL certificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 8 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/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 case SECURITY_TEXT: { 352 case SECURITY_TEXT: {
353 SkColor color; 353 SkColor color;
354 switch (security_level) { 354 switch (security_level) {
355 case ToolbarModel::EV_SECURE: 355 case ToolbarModel::EV_SECURE:
356 case ToolbarModel::SECURE: 356 case ToolbarModel::SECURE:
357 color = SkColorSetRGB(7, 149, 0); 357 color = SkColorSetRGB(7, 149, 0);
358 break; 358 break;
359 359
360 case ToolbarModel::SECURITY_WARNING: 360 case ToolbarModel::SECURITY_WARNING:
361 case ToolbarModel::SECURITY_POLICY_WARNING:
361 return GetColor(security_level, DEEMPHASIZED_TEXT); 362 return GetColor(security_level, DEEMPHASIZED_TEXT);
362 break; 363 break;
363 364
364 case ToolbarModel::SECURITY_ERROR: 365 case ToolbarModel::SECURITY_ERROR:
365 color = SkColorSetRGB(162, 0, 0); 366 color = SkColorSetRGB(162, 0, 0);
366 break; 367 break;
367 368
368 default: 369 default:
369 NOTREACHED(); 370 NOTREACHED();
370 return GetColor(security_level, TEXT); 371 return GetColor(security_level, TEXT);
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 int LocationBarView::GetInternalHeight(bool use_preferred_size) { 1465 int LocationBarView::GetInternalHeight(bool use_preferred_size) {
1465 int total_height = 1466 int total_height =
1466 use_preferred_size ? GetPreferredSize().height() : height(); 1467 use_preferred_size ? GetPreferredSize().height() : height();
1467 return std::max(total_height - (kVerticalEdgeThickness * 2), 0); 1468 return std::max(total_height - (kVerticalEdgeThickness * 2), 0);
1468 } 1469 }
1469 1470
1470 bool LocationBarView::HasValidSuggestText() const { 1471 bool LocationBarView::HasValidSuggestText() const {
1471 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1472 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1472 !suggested_text_view_->text().empty(); 1473 !suggested_text_view_->text().empty();
1473 } 1474 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698