| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_navigator.h" | 5 #include "chrome/browser/ui/browser_navigator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 if (!params->browser) | 392 if (!params->browser) |
| 393 return; | 393 return; |
| 394 | 394 |
| 395 // Navigate() must not return early after this point. | 395 // Navigate() must not return early after this point. |
| 396 | 396 |
| 397 if (GetSourceProfile(params, source_browser) != params->browser->profile()) { | 397 if (GetSourceProfile(params, source_browser) != params->browser->profile()) { |
| 398 // A tab is being opened from a link from a different profile, we must reset | 398 // A tab is being opened from a link from a different profile, we must reset |
| 399 // source information that may cause state to be shared. | 399 // source information that may cause state to be shared. |
| 400 params->source_contents = NULL; | 400 params->source_contents = NULL; |
| 401 params->referrer = GURL(); | 401 params->referrer = content::Referrer(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 // Make sure the Browser is shown if params call for it. | 404 // Make sure the Browser is shown if params call for it. |
| 405 ScopedBrowserDisplayer displayer(params); | 405 ScopedBrowserDisplayer displayer(params); |
| 406 | 406 |
| 407 // Makes sure any TabContents created by this function is destroyed if | 407 // Makes sure any TabContents created by this function is destroyed if |
| 408 // not properly added to a tab strip. | 408 // not properly added to a tab strip. |
| 409 ScopedTargetContentsOwner target_contents_owner(params); | 409 ScopedTargetContentsOwner target_contents_owner(params); |
| 410 | 410 |
| 411 // Some dispositions need coercion to base types. | 411 // Some dispositions need coercion to base types. |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 // chrome://settings. | 626 // chrome://settings. |
| 627 | 627 |
| 628 return !(url.scheme() == chrome::kChromeUIScheme && | 628 return !(url.scheme() == chrome::kChromeUIScheme && |
| 629 (url.host() == chrome::kChromeUISettingsHost || | 629 (url.host() == chrome::kChromeUISettingsHost || |
| 630 url.host() == chrome::kChromeUIExtensionsHost || | 630 url.host() == chrome::kChromeUIExtensionsHost || |
| 631 url.host() == chrome::kChromeUIBookmarksHost || | 631 url.host() == chrome::kChromeUIBookmarksHost || |
| 632 url.host() == chrome::kChromeUISyncPromoHost)); | 632 url.host() == chrome::kChromeUISyncPromoHost)); |
| 633 } | 633 } |
| 634 | 634 |
| 635 } // namespace browser | 635 } // namespace browser |
| OLD | NEW |