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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 15907006: Rip out browser-side RID caching for most visited items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "base/values.h" 14 #include "base/values.h"
14 #include "chrome/common/child_process_logging.h" 15 #include "chrome/common/child_process_logging.h"
15 #include "chrome/common/chrome_content_client.h" 16 #include "chrome/common/chrome_content_client.h"
16 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
17 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/content_settings_pattern.h" 19 #include "chrome/common/content_settings_pattern.h"
19 #include "chrome/common/extensions/chrome_manifest_handlers.h" 20 #include "chrome/common/extensions/chrome_manifest_handlers.h"
20 #include "chrome/common/extensions/extension.h" 21 #include "chrome/common/extensions/extension.h"
21 #include "chrome/common/extensions/extension_constants.h" 22 #include "chrome/common/extensions/extension_constants.h"
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 } 986 }
986 987
987 if (url.SchemeIs(chrome::kExtensionResourceScheme) && 988 if (url.SchemeIs(chrome::kExtensionResourceScheme) &&
988 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme( 989 !extensions::ResourceRequestPolicy::CanRequestExtensionResourceScheme(
989 url, 990 url,
990 frame)) { 991 frame)) {
991 *new_url = GURL(chrome::kExtensionResourceInvalidRequestURL); 992 *new_url = GURL(chrome::kExtensionResourceInvalidRequestURL);
992 return true; 993 return true;
993 } 994 }
994 995
996 const content::RenderView* render_view =
997 content::RenderView::FromWebView(frame->view());
998 SearchBox* search_box = SearchBox::Get(render_view);
999 if (search_box && url.SchemeIs(chrome::kChromeSearchScheme)) {
1000 if (url.host() == chrome::kChromeUIThumbnailHost)
1001 return search_box->GenerateThumbnailURLFromTransientURL(url, new_url);
1002 else if (url.host() == chrome::kChromeUIFaviconHost)
1003 return search_box->GenerateFaviconURLFromTransientURL(url, new_url);
1004 }
1005
995 return false; 1006 return false;
996 } 1007 }
997 1008
998 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() { 1009 bool ChromeContentRendererClient::ShouldPumpEventsDuringCookieMessage() {
999 // We no longer pump messages, even under Chrome Frame. We rely on cookie 1010 // We no longer pump messages, even under Chrome Frame. We rely on cookie
1000 // read requests handled by CF not putting up UI or causing other actions 1011 // read requests handled by CF not putting up UI or causing other actions
1001 // that would require us to pump messages. This fixes http://crbug.com/110090. 1012 // that would require us to pump messages. This fixes http://crbug.com/110090.
1002 return false; 1013 return false;
1003 } 1014 }
1004 1015
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 1205
1195 if (container->element().shadowHost().isNull()) 1206 if (container->element().shadowHost().isNull())
1196 return false; 1207 return false;
1197 1208
1198 WebString tag_name = container->element().shadowHost().tagName(); 1209 WebString tag_name = container->element().shadowHost().tagName();
1199 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || 1210 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) ||
1200 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); 1211 tag_name.equals(WebString::fromUTF8(kAdViewTagName));
1201 } 1212 }
1202 1213
1203 } // namespace chrome 1214 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/searchbox/searchbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698