Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: merge master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 // Send the new override string to the renderer. 1043 // Send the new override string to the renderer.
1044 RenderViewHost* host = GetRenderViewHost(); 1044 RenderViewHost* host = GetRenderViewHost();
1045 if (host) 1045 if (host)
1046 host->SyncRendererPrefs(); 1046 host->SyncRendererPrefs();
1047 1047
1048 // Reload the page if a load is currently in progress to avoid having 1048 // Reload the page if a load is currently in progress to avoid having
1049 // different parts of the page loaded using different user agents. 1049 // different parts of the page loaded using different user agents.
1050 NavigationEntry* entry = controller_.GetVisibleEntry(); 1050 NavigationEntry* entry = controller_.GetVisibleEntry();
1051 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) 1051 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent())
1052 controller_.ReloadBypassingCache(true); 1052 controller_.Reload(ReloadType::BYPASSING_CACHE, true);
1053 1053
1054 for (auto& observer : observers_) 1054 for (auto& observer : observers_)
1055 observer.UserAgentOverrideSet(override); 1055 observer.UserAgentOverrideSet(override);
1056 } 1056 }
1057 1057
1058 const std::string& WebContentsImpl::GetUserAgentOverride() const { 1058 const std::string& WebContentsImpl::GetUserAgentOverride() const {
1059 return renderer_preferences_.user_agent_override; 1059 return renderer_preferences_.user_agent_override;
1060 } 1060 }
1061 1061
1062 void WebContentsImpl::EnableWebContentsOnlyAccessibilityMode() { 1062 void WebContentsImpl::EnableWebContentsOnlyAccessibilityMode() {
(...skipping 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after
5332 GetMainFrame()->AddMessageToConsole( 5332 GetMainFrame()->AddMessageToConsole(
5333 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5333 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5334 base::StringPrintf("This site does not have a valid SSL " 5334 base::StringPrintf("This site does not have a valid SSL "
5335 "certificate! Without SSL, your site's and " 5335 "certificate! Without SSL, your site's and "
5336 "visitors' data is vulnerable to theft and " 5336 "visitors' data is vulnerable to theft and "
5337 "tampering. Get a valid SSL certificate before" 5337 "tampering. Get a valid SSL certificate before"
5338 " releasing your website to the public.")); 5338 " releasing your website to the public."));
5339 } 5339 }
5340 5340
5341 } // namespace content 5341 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698