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

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

Issue 1008723006: Remove HTTP cache Record/Playback support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/playback_extension.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/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/renderer/chrome_render_process_observer.h" 31 #include "chrome/renderer/chrome_render_process_observer.h"
32 #include "chrome/renderer/chrome_render_view_observer.h" 32 #include "chrome/renderer/chrome_render_view_observer.h"
33 #include "chrome/renderer/content_settings_observer.h" 33 #include "chrome/renderer/content_settings_observer.h"
34 #include "chrome/renderer/external_extension.h" 34 #include "chrome/renderer/external_extension.h"
35 #include "chrome/renderer/loadtimes_extension_bindings.h" 35 #include "chrome/renderer/loadtimes_extension_bindings.h"
36 #include "chrome/renderer/media/chrome_key_systems.h" 36 #include "chrome/renderer/media/chrome_key_systems.h"
37 #include "chrome/renderer/net/net_error_helper.h" 37 #include "chrome/renderer/net/net_error_helper.h"
38 #include "chrome/renderer/net_benchmarking_extension.h" 38 #include "chrome/renderer/net_benchmarking_extension.h"
39 #include "chrome/renderer/page_load_histograms.h" 39 #include "chrome/renderer/page_load_histograms.h"
40 #include "chrome/renderer/pepper/pepper_helper.h" 40 #include "chrome/renderer/pepper/pepper_helper.h"
41 #include "chrome/renderer/playback_extension.h"
42 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" 41 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
43 #include "chrome/renderer/plugins/plugin_preroller.h" 42 #include "chrome/renderer/plugins/plugin_preroller.h"
44 #include "chrome/renderer/plugins/plugin_uma.h" 43 #include "chrome/renderer/plugins/plugin_uma.h"
45 #include "chrome/renderer/plugins/shadow_dom_plugin_placeholder.h" 44 #include "chrome/renderer/plugins/shadow_dom_plugin_placeholder.h"
46 #include "chrome/renderer/prefetch_helper.h" 45 #include "chrome/renderer/prefetch_helper.h"
47 #include "chrome/renderer/prerender/prerender_dispatcher.h" 46 #include "chrome/renderer/prerender/prerender_dispatcher.h"
48 #include "chrome/renderer/prerender/prerender_helper.h" 47 #include "chrome/renderer/prerender/prerender_helper.h"
49 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h" 48 #include "chrome/renderer/prerender/prerender_media_load_deferrer.h"
50 #include "chrome/renderer/prerender/prerenderer_client.h" 49 #include "chrome/renderer/prerender/prerenderer_client.h"
51 #include "chrome/renderer/safe_browsing/malware_dom_details.h" 50 #include "chrome/renderer/safe_browsing/malware_dom_details.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 thread->RegisterExtension(extensions_v8::LoadTimesExtension::Get()); 423 thread->RegisterExtension(extensions_v8::LoadTimesExtension::Get());
425 424
426 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 425 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
427 if (command_line->HasSwitch(switches::kEnableBenchmarking)) 426 if (command_line->HasSwitch(switches::kEnableBenchmarking))
428 thread->RegisterExtension(extensions_v8::BenchmarkingExtension::Get()); 427 thread->RegisterExtension(extensions_v8::BenchmarkingExtension::Get());
429 if (command_line->HasSwitch(switches::kEnableNetBenchmarking)) 428 if (command_line->HasSwitch(switches::kEnableNetBenchmarking))
430 thread->RegisterExtension(extensions_v8::NetBenchmarkingExtension::Get()); 429 thread->RegisterExtension(extensions_v8::NetBenchmarkingExtension::Get());
431 if (command_line->HasSwitch(switches::kInstantProcess)) 430 if (command_line->HasSwitch(switches::kInstantProcess))
432 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get()); 431 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get());
433 432
434 if (command_line->HasSwitch(switches::kPlaybackMode) ||
435 command_line->HasSwitch(switches::kRecordMode)) {
436 thread->RegisterExtension(extensions_v8::PlaybackExtension::Get());
437 }
438
439 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages 433 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages
440 // should not be accessible by normal content, and should also be unable to 434 // should not be accessible by normal content, and should also be unable to
441 // script anything but themselves (to help limit the damage that a corrupt 435 // script anything but themselves (to help limit the damage that a corrupt
442 // page could cause). 436 // page could cause).
443 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); 437 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme));
444 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); 438 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
445 439
446 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); 440 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme));
447 // The Instant process can only display the content but not read it. Other 441 // The Instant process can only display the content but not read it. Other
448 // processes can't display it or read it. 442 // processes can't display it or read it.
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 if (mime_type == content::kBrowserPluginMimeType) { 1646 if (mime_type == content::kBrowserPluginMimeType) {
1653 return new extensions::ExtensionsGuestViewContainer(render_frame); 1647 return new extensions::ExtensionsGuestViewContainer(render_frame);
1654 } else { 1648 } else {
1655 return new extensions::MimeHandlerViewContainer( 1649 return new extensions::MimeHandlerViewContainer(
1656 render_frame, mime_type, original_url); 1650 render_frame, mime_type, original_url);
1657 } 1651 }
1658 #else 1652 #else
1659 return NULL; 1653 return NULL;
1660 #endif 1654 #endif
1661 } 1655 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/playback_extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698