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

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

Issue 181373003: Link chrome_elf.dll instead of statically linking the blacklist code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add header Created 6 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/chrome_browser.gypi ('k') | chrome_elf/blacklist.gypi » ('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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( 358 WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy(
359 extension_resource_scheme); 359 extension_resource_scheme);
360 360
361 extensions::ExtensionsClient::Set( 361 extensions::ExtensionsClient::Set(
362 extensions::ChromeExtensionsClient::GetInstance()); 362 extensions::ChromeExtensionsClient::GetInstance());
363 363
364 #if defined(OS_WIN) 364 #if defined(OS_WIN)
365 // Report if the renderer process has been patched by chrome_elf. 365 // Report if the renderer process has been patched by chrome_elf.
366 // TODO(csharp): Remove once the renderer is no longer getting 366 // TODO(csharp): Remove once the renderer is no longer getting
367 // patched this way. 367 // patched this way.
368 typedef bool(*IsBlacklistInitializedFunc)(); 368 if (blacklist::IsBlacklistInitialized())
369 IsBlacklistInitializedFunc is_blacklist_initialized =
370 reinterpret_cast<IsBlacklistInitializedFunc>(
371 GetProcAddress(GetModuleHandle(L"chrome_elf.dll"),
372 "IsBlacklistInitialized"));
373 if (is_blacklist_initialized && is_blacklist_initialized())
374 UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true); 369 UMA_HISTOGRAM_BOOLEAN("Blacklist.PatchedInRenderer", true);
375 #endif 370 #endif
376 } 371 }
377 372
378 void ChromeContentRendererClient::RenderFrameCreated( 373 void ChromeContentRendererClient::RenderFrameCreated(
379 content::RenderFrame* render_frame) { 374 content::RenderFrame* render_frame) {
380 new ChromeRenderFrameObserver(render_frame); 375 new ChromeRenderFrameObserver(render_frame);
381 376
382 ContentSettingsObserver* content_settings = 377 ContentSettingsObserver* content_settings =
383 new ContentSettingsObserver(render_frame, extension_dispatcher_.get()); 378 new ContentSettingsObserver(render_frame, extension_dispatcher_.get());
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1432 CommandLine* command_line = CommandLine::ForCurrentProcess();
1438 return !command_line->HasSwitch(extensions::switches::kExtensionProcess); 1433 return !command_line->HasSwitch(extensions::switches::kExtensionProcess);
1439 } 1434 }
1440 1435
1441 blink::WebWorkerPermissionClientProxy* 1436 blink::WebWorkerPermissionClientProxy*
1442 ChromeContentRendererClient::CreateWorkerPermissionClientProxy( 1437 ChromeContentRendererClient::CreateWorkerPermissionClientProxy(
1443 content::RenderFrame* render_frame, 1438 content::RenderFrame* render_frame,
1444 blink::WebFrame* frame) { 1439 blink::WebFrame* frame) {
1445 return new WorkerPermissionClientProxy(render_frame, frame); 1440 return new WorkerPermissionClientProxy(render_frame, frame);
1446 } 1441 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome_elf/blacklist.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698