| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/ssl_policy.h" | 5 #include "chrome/browser/ssl_policy.h" |
| 6 | 6 |
| 7 #include "base/singleton.h" | 7 #include "base/singleton.h" |
| 8 #include "base/string_piece.h" | 8 #include "base/string_piece.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "chrome/browser/browser_resources.h" | 10 #include "chrome/browser/browser_resources.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 UTF8ToWide(entry->url().spec()), | 437 UTF8ToWide(entry->url().spec()), |
| 438 UTF8ToWide(url.spec())); | 438 UTF8ToWide(url.spec())); |
| 439 manager->AddMessageToConsole(msg, MESSAGE_LEVEL_WARNING); | 439 manager->AddMessageToConsole(msg, MESSAGE_LEVEL_WARNING); |
| 440 } | 440 } |
| 441 | 441 |
| 442 if (changed) { | 442 if (changed) { |
| 443 // Only send the notification when something actually changed. | 443 // Only send the notification when something actually changed. |
| 444 NotificationService::current()->Notify( | 444 NotificationService::current()->Notify( |
| 445 NOTIFY_SSL_STATE_CHANGED, | 445 NOTIFY_SSL_STATE_CHANGED, |
| 446 Source<NavigationController>(manager->controller()), | 446 Source<NavigationController>(manager->controller()), |
| 447 Details<NavigationEntry>(entry)); | 447 NotificationService::NoDetails()); |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 | 450 |
| 451 SecurityStyle SSLPolicy::GetDefaultStyle(const GURL& url) { | 451 SecurityStyle SSLPolicy::GetDefaultStyle(const GURL& url) { |
| 452 // Show the secure style for HTTPS. | 452 // Show the secure style for HTTPS. |
| 453 if (url.SchemeIsSecure()) { | 453 if (url.SchemeIsSecure()) { |
| 454 // TODO(jcampan): bug #1178228 Disabling the broken style for intranet | 454 // TODO(jcampan): bug #1178228 Disabling the broken style for intranet |
| 455 // hosts for beta as it is missing error strings (and cert status). | 455 // hosts for beta as it is missing error strings (and cert status). |
| 456 // CAs issue certs for intranet hosts to anyone. | 456 // CAs issue certs for intranet hosts to anyone. |
| 457 // if (IsIntranetHost(url.host())) | 457 // if (IsIntranetHost(url.host())) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 482 // Note that we should not call SetMaxSecurityStyle here, because the active | 482 // Note that we should not call SetMaxSecurityStyle here, because the active |
| 483 // NavigationEntry has just been deleted (in HideInterstitialPage) and the | 483 // NavigationEntry has just been deleted (in HideInterstitialPage) and the |
| 484 // new NavigationEntry will not be set until DidNavigate. This is ok, | 484 // new NavigationEntry will not be set until DidNavigate. This is ok, |
| 485 // because the new NavigationEntry will have its max security style set | 485 // because the new NavigationEntry will have its max security style set |
| 486 // within DidNavigate. | 486 // within DidNavigate. |
| 487 error->ContinueRequest(); | 487 error->ContinueRequest(); |
| 488 error->manager()->AllowCertForHost(error->ssl_info().cert, | 488 error->manager()->AllowCertForHost(error->ssl_info().cert, |
| 489 error->request_url().host()); | 489 error->request_url().host()); |
| 490 } | 490 } |
| 491 | 491 |
| OLD | NEW |