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