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

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

Issue 164833002: Revert 251095 "Revert 250828 "Add a UMA stat to track if the Bro..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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 | « trunk/src/chrome/renderer/DEPS ('k') | trunk/src/chrome/unit_tests.isolate » ('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/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 #if defined(ENABLE_WEBRTC) 110 #if defined(ENABLE_WEBRTC)
111 #include "chrome/renderer/media/webrtc_logging_message_filter.h" 111 #include "chrome/renderer/media/webrtc_logging_message_filter.h"
112 #endif 112 #endif
113 113
114 #if defined(ENABLE_SPELLCHECK) 114 #if defined(ENABLE_SPELLCHECK)
115 #include "chrome/renderer/spellchecker/spellcheck.h" 115 #include "chrome/renderer/spellchecker/spellcheck.h"
116 #include "chrome/renderer/spellchecker/spellcheck_provider.h" 116 #include "chrome/renderer/spellchecker/spellcheck_provider.h"
117 #endif 117 #endif
118 118
119 #if defined(OS_WIN)
120 #include "chrome_elf/blacklist/blacklist.h"
121 #endif // OS_WIN
122
119 using autofill::AutofillAgent; 123 using autofill::AutofillAgent;
120 using autofill::PasswordAutofillAgent; 124 using autofill::PasswordAutofillAgent;
121 using autofill::PasswordGenerationAgent; 125 using autofill::PasswordGenerationAgent;
122 using base::ASCIIToUTF16; 126 using base::ASCIIToUTF16;
123 using base::UserMetricsAction; 127 using base::UserMetricsAction;
124 using content::RenderThread; 128 using content::RenderThread;
125 using content::WebPluginInfo; 129 using content::WebPluginInfo;
126 using extensions::Extension; 130 using extensions::Extension;
127 using blink::WebCache; 131 using blink::WebCache;
128 using blink::WebConsoleMessage; 132 using blink::WebConsoleMessage;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 350
347 // chrome-extension: resources should bypass Content Security Policy checks 351 // chrome-extension: resources should bypass Content Security Policy checks
348 // when included in protected resources. 352 // when included in protected resources.
349 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( 353 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
350 extension_scheme); 354 extension_scheme);
351 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( 355 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
352 extension_resource_scheme); 356 extension_resource_scheme);
353 357
354 extensions::ExtensionsClient::Set( 358 extensions::ExtensionsClient::Set(
355 extensions::ChromeExtensionsClient::GetInstance()); 359 extensions::ChromeExtensionsClient::GetInstance());
360
361 #if defined(OS_WIN)
362 // Report if the renderer process has been patched by chrome_elf.
363 // TODO(csharp): Remove once the renderer is no longer getting
364 // patched this way.
365 typedef bool(*IsBlacklistInitializedFunc)();
366 IsBlacklistInitializedFunc is_blacklist_initialized =
367 reinterpret_cast<IsBlacklistInitializedFunc>(
368 GetProcAddress(GetModuleHandle(L"chrome_elf.dll"),
369 "IsBlacklistInitialized"));
370 if (is_blacklist_initialized())
371 UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true);
372 #endif
356 } 373 }
357 374
358 void ChromeContentRendererClient::RenderFrameCreated( 375 void ChromeContentRendererClient::RenderFrameCreated(
359 content::RenderFrame* render_frame) { 376 content::RenderFrame* render_frame) {
360 new ChromeRenderFrameObserver(render_frame); 377 new ChromeRenderFrameObserver(render_frame);
361 378
362 ContentSettingsObserver* content_settings = 379 ContentSettingsObserver* content_settings =
363 new ContentSettingsObserver(render_frame, extension_dispatcher_.get()); 380 new ContentSettingsObserver(render_frame, extension_dispatcher_.get());
364 if (chrome_observer_.get()) { 381 if (chrome_observer_.get()) {
365 content_settings->SetContentSettingRules( 382 content_settings->SetContentSettingRules(
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1434 CommandLine* command_line = CommandLine::ForCurrentProcess();
1418 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1435 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1419 } 1436 }
1420 1437
1421 blink::WebWorkerPermissionClientProxy* 1438 blink::WebWorkerPermissionClientProxy*
1422 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1439 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1423 content::RenderFrame* render_frame, 1440 content::RenderFrame* render_frame,
1424 blink::WebFrame* frame) { 1441 blink::WebFrame* frame) {
1425 return new WorkerPermissionClientProxy(render_frame, frame); 1442 return new WorkerPermissionClientProxy(render_frame, frame);
1426 } 1443 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/renderer/DEPS ('k') | trunk/src/chrome/unit_tests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698