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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 } | 386 } |
387 | 387 |
388 if (!ChromeWebUIControllerFactory::GetInstance()->UseWebUIForURL( | 388 if (!ChromeWebUIControllerFactory::GetInstance()->UseWebUIForURL( |
389 browser_context, *url)) | 389 browser_context, *url)) |
390 return false; | 390 return false; |
391 | 391 |
392 #if defined(OS_CHROMEOS) | 392 #if defined(OS_CHROMEOS) |
393 // Special case : in ChromeOS in Guest mode bookmarks and history are | 393 // Special case : in ChromeOS in Guest mode bookmarks and history are |
394 // disabled for security reasons. New tab page explains the reasons, so | 394 // disabled for security reasons. New tab page explains the reasons, so |
395 // we redirect user to new tab page. | 395 // we redirect user to new tab page. |
396 if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) { | 396 if (chromeos::GetUserManager()->IsLoggedInAsGuest()) { |
397 if (url->SchemeIs(content::kChromeUIScheme) && | 397 if (url->SchemeIs(content::kChromeUIScheme) && |
398 (url->DomainIs(chrome::kChromeUIBookmarksHost) || | 398 (url->DomainIs(chrome::kChromeUIBookmarksHost) || |
399 url->DomainIs(chrome::kChromeUIHistoryHost))) { | 399 url->DomainIs(chrome::kChromeUIHistoryHost))) { |
400 // Rewrite with new tab URL | 400 // Rewrite with new tab URL |
401 *url = GURL(chrome::kChromeUINewTabURL); | 401 *url = GURL(chrome::kChromeUINewTabURL); |
402 } | 402 } |
403 } | 403 } |
404 #endif | 404 #endif |
405 | 405 |
406 return true; | 406 return true; |
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2806 switches::kDisableWebRtcEncryption, | 2806 switches::kDisableWebRtcEncryption, |
2807 }; | 2807 }; |
2808 to_command_line->CopySwitchesFrom(from_command_line, | 2808 to_command_line->CopySwitchesFrom(from_command_line, |
2809 kWebRtcDevSwitchNames, | 2809 kWebRtcDevSwitchNames, |
2810 arraysize(kWebRtcDevSwitchNames)); | 2810 arraysize(kWebRtcDevSwitchNames)); |
2811 } | 2811 } |
2812 } | 2812 } |
2813 #endif // defined(ENABLE_WEBRTC) | 2813 #endif // defined(ENABLE_WEBRTC) |
2814 | 2814 |
2815 } // namespace chrome | 2815 } // namespace chrome |
OLD | NEW |