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

Side by Side Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months 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 | Annotate | Revision Log
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 "chrome/browser/renderer_host/chrome_render_view_host_observer.h" 5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void ChromeRenderViewHostObserver::RenderViewHostDestroyed( 73 void ChromeRenderViewHostObserver::RenderViewHostDestroyed(
74 RenderViewHost* rvh) { 74 RenderViewHost* rvh) {
75 RemoveRenderViewHostForExtensions(rvh); 75 RemoveRenderViewHostForExtensions(rvh);
76 delete this; 76 delete this;
77 } 77 }
78 78
79 void ChromeRenderViewHostObserver::Navigate(const GURL& url) { 79 void ChromeRenderViewHostObserver::Navigate(const GURL& url) {
80 if (!predictor_) 80 if (!predictor_)
81 return; 81 return;
82 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) && 82 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) &&
83 (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme))) 83 (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(content::kHttpsScheme)))
84 predictor_->PreconnectUrlAndSubresources(url, GURL()); 84 predictor_->PreconnectUrlAndSubresources(url, GURL());
85 } 85 }
86 86
87 bool ChromeRenderViewHostObserver::OnMessageReceived( 87 bool ChromeRenderViewHostObserver::OnMessageReceived(
88 const IPC::Message& message) { 88 const IPC::Message& message) {
89 bool handled = true; 89 bool handled = true;
90 IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewHostObserver, message) 90 IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewHostObserver, message)
91 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched, 91 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched,
92 OnFocusedNodeTouched) 92 OnFocusedNodeTouched)
93 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK, 93 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 DCHECK(!content_type.empty()); 237 DCHECK(!content_type.empty());
238 open_url_params.uses_post = true; 238 open_url_params.uses_post = true;
239 open_url_params.browser_initiated_post_data = 239 open_url_params.browser_initiated_post_data =
240 base::RefCountedString::TakeString(post_data); 240 base::RefCountedString::TakeString(post_data);
241 open_url_params.extra_headers += base::StringPrintf( 241 open_url_params.extra_headers += base::StringPrintf(
242 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, 242 "%s: %s\r\n", net::HttpRequestHeaders::kContentType,
243 content_type.c_str()); 243 content_type.c_str());
244 } 244 }
245 web_contents->OpenURL(open_url_params); 245 web_contents->OpenURL(open_url_params);
246 } 246 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/renderer_host/offline_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698