| 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 browser_context, *url)) | 354 browser_context, *url)) |
| 355 return false; | 355 return false; |
| 356 | 356 |
| 357 #if defined(OS_CHROMEOS) | 357 #if defined(OS_CHROMEOS) |
| 358 // Special case : in ChromeOS in Guest mode bookmarks and history are | 358 // Special case : in ChromeOS in Guest mode bookmarks and history are |
| 359 // disabled for security reasons. New tab page explains the reasons, so | 359 // disabled for security reasons. New tab page explains the reasons, so |
| 360 // we redirect user to new tab page. | 360 // we redirect user to new tab page. |
| 361 if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) { | 361 if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) { |
| 362 if (url->SchemeIs(chrome::kChromeUIScheme) && | 362 if (url->SchemeIs(chrome::kChromeUIScheme) && |
| 363 (url->DomainIs(chrome::kChromeUIBookmarksHost) || | 363 (url->DomainIs(chrome::kChromeUIBookmarksHost) || |
| 364 url->DomainIs(chrome::kChromeUIEnhancedBookmarksHost) || |
| 364 url->DomainIs(chrome::kChromeUIHistoryHost))) { | 365 url->DomainIs(chrome::kChromeUIHistoryHost))) { |
| 365 // Rewrite with new tab URL | 366 // Rewrite with new tab URL |
| 366 *url = GURL(chrome::kChromeUINewTabURL); | 367 *url = GURL(chrome::kChromeUINewTabURL); |
| 367 } | 368 } |
| 368 } | 369 } |
| 369 #endif | 370 #endif |
| 370 | 371 |
| 371 // Special case the new tab page. In older versions of Chrome, the new tab | 372 // Special case the new tab page. In older versions of Chrome, the new tab |
| 372 // page was hosted at chrome-internal:<blah>. This might be in people's saved | 373 // page was hosted at chrome-internal:<blah>. This might be in people's saved |
| 373 // sessions or bookmarks, so we say any URL with that scheme triggers the new | 374 // sessions or bookmarks, so we say any URL with that scheme triggers the new |
| (...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2546 #if defined(USE_NSS) | 2547 #if defined(USE_NSS) |
| 2547 crypto::CryptoModuleBlockingPasswordDelegate* | 2548 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2548 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2549 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2549 const GURL& url) { | 2550 const GURL& url) { |
| 2550 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2551 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2551 chrome::kCryptoModulePasswordKeygen, url.host()); | 2552 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2552 } | 2553 } |
| 2553 #endif | 2554 #endif |
| 2554 | 2555 |
| 2555 } // namespace chrome | 2556 } // namespace chrome |
| OLD | NEW |