| 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 | 1061 |
| 1062 // Send the new override string to the renderer. | 1062 // Send the new override string to the renderer. |
| 1063 RenderViewHost* host = GetRenderViewHost(); | 1063 RenderViewHost* host = GetRenderViewHost(); |
| 1064 if (host) | 1064 if (host) |
| 1065 host->SyncRendererPrefs(); | 1065 host->SyncRendererPrefs(); |
| 1066 | 1066 |
| 1067 // Reload the page if a load is currently in progress to avoid having | 1067 // Reload the page if a load is currently in progress to avoid having |
| 1068 // different parts of the page loaded using different user agents. | 1068 // different parts of the page loaded using different user agents. |
| 1069 NavigationEntry* entry = controller_.GetVisibleEntry(); | 1069 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 1070 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) | 1070 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) |
| 1071 controller_.ReloadBypassingCache(true); | 1071 controller_.Reload(true, ReloadType::BYPASSING_CACHE); |
| 1072 | 1072 |
| 1073 for (auto& observer : observers_) | 1073 for (auto& observer : observers_) |
| 1074 observer.UserAgentOverrideSet(override); | 1074 observer.UserAgentOverrideSet(override); |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 const std::string& WebContentsImpl::GetUserAgentOverride() const { | 1077 const std::string& WebContentsImpl::GetUserAgentOverride() const { |
| 1078 return renderer_preferences_.user_agent_override; | 1078 return renderer_preferences_.user_agent_override; |
| 1079 } | 1079 } |
| 1080 | 1080 |
| 1081 void WebContentsImpl::EnableTreeOnlyAccessibilityMode() { | 1081 void WebContentsImpl::EnableTreeOnlyAccessibilityMode() { |
| (...skipping 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5327 GetMainFrame()->AddMessageToConsole( | 5327 GetMainFrame()->AddMessageToConsole( |
| 5328 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5328 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5329 base::StringPrintf("This site does not have a valid SSL " | 5329 base::StringPrintf("This site does not have a valid SSL " |
| 5330 "certificate! Without SSL, your site's and " | 5330 "certificate! Without SSL, your site's and " |
| 5331 "visitors' data is vulnerable to theft and " | 5331 "visitors' data is vulnerable to theft and " |
| 5332 "tampering. Get a valid SSL certificate before" | 5332 "tampering. Get a valid SSL certificate before" |
| 5333 " releasing your website to the public.")); | 5333 " releasing your website to the public.")); |
| 5334 } | 5334 } |
| 5335 | 5335 |
| 5336 } // namespace content | 5336 } // namespace content |
| OLD | NEW |