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

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

Issue 23658056: content: Move kHttpScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void ChromeRenderViewHostObserver::RenderViewHostDestroyed( 74 void ChromeRenderViewHostObserver::RenderViewHostDestroyed(
75 RenderViewHost* rvh) { 75 RenderViewHost* rvh) {
76 RemoveRenderViewHostForExtensions(rvh); 76 RemoveRenderViewHostForExtensions(rvh);
77 delete this; 77 delete this;
78 } 78 }
79 79
80 void ChromeRenderViewHostObserver::Navigate(const GURL& url) { 80 void ChromeRenderViewHostObserver::Navigate(const GURL& url) {
81 if (!predictor_) 81 if (!predictor_)
82 return; 82 return;
83 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) && 83 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) &&
84 (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(content::kHttpsScheme))) 84 (url.SchemeIs(content::kHttpScheme) ||
85 url.SchemeIs(content::kHttpsScheme)))
85 predictor_->PreconnectUrlAndSubresources(url, GURL()); 86 predictor_->PreconnectUrlAndSubresources(url, GURL());
86 } 87 }
87 88
88 bool ChromeRenderViewHostObserver::OnMessageReceived( 89 bool ChromeRenderViewHostObserver::OnMessageReceived(
89 const IPC::Message& message) { 90 const IPC::Message& message) {
90 bool handled = true; 91 bool handled = true;
91 IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewHostObserver, message) 92 IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewHostObserver, message)
92 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched, 93 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched,
93 OnFocusedNodeTouched) 94 OnFocusedNodeTouched)
94 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK, 95 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 DCHECK(!content_type.empty()); 241 DCHECK(!content_type.empty());
241 open_url_params.uses_post = true; 242 open_url_params.uses_post = true;
242 open_url_params.browser_initiated_post_data = 243 open_url_params.browser_initiated_post_data =
243 base::RefCountedString::TakeString(post_data); 244 base::RefCountedString::TakeString(post_data);
244 open_url_params.extra_headers += base::StringPrintf( 245 open_url_params.extra_headers += base::StringPrintf(
245 "%s: %s\r\n", net::HttpRequestHeaders::kContentType, 246 "%s: %s\r\n", net::HttpRequestHeaders::kContentType,
246 content_type.c_str()); 247 content_type.c_str());
247 } 248 }
248 web_contents->OpenURL(open_url_params); 249 web_contents->OpenURL(open_url_params);
249 } 250 }
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