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

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

Issue 7545018: Remove --enable-remoting flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/chrome_switches.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_render_process_observer.h" 5 #include "chrome/renderer/chrome_render_process_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 FilePath pdf; 356 FilePath pdf;
357 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && 357 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
358 file_util::PathExists(pdf)) { 358 file_util::PathExists(pdf)) {
359 g_iat_patch_createdca.Patch( 359 g_iat_patch_createdca.Patch(
360 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); 360 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch);
361 g_iat_patch_get_font_data.Patch( 361 g_iat_patch_get_font_data.Patch(
362 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); 362 pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch);
363 } 363 }
364 #endif 364 #endif
365 365
366 #if defined(OS_POSIX) && !defined(OS_MACOSX) 366 #if defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS)
367 // Remoting requires NSS to function properly. 367 // Remoting requires NSS to function properly.
368 if (!command_line.HasSwitch(switches::kSingleProcess) && 368 if (!command_line.HasSwitch(switches::kSingleProcess)) {
369 command_line.HasSwitch(switches::kEnableRemoting)) {
370 #if defined(USE_NSS)
371 // We are going to fork to engage the sandbox and we have not loaded 369 // We are going to fork to engage the sandbox and we have not loaded
372 // any security modules so it is safe to disable the fork check in NSS. 370 // any security modules so it is safe to disable the fork check in NSS.
373 crypto::DisableNSSForkCheck(); 371 crypto::DisableNSSForkCheck();
374 crypto::ForceNSSNoDBInit(); 372 crypto::ForceNSSNoDBInit();
375 crypto::EnsureNSSInit(); 373 crypto::EnsureNSSInit();
376 #else
377 // TODO(bulach): implement openssl support.
378 NOTREACHED() << "Remoting is not supported for openssl";
379 #endif
380 } 374 }
381 #elif defined(OS_WIN) 375 #elif defined(OS_WIN)
382 // crypt32.dll is used to decode X509 certificates for Chromoting. 376 // crypt32.dll is used to decode X509 certificates for Chromoting.
383 // Only load this library when the feature is enabled. 377 // Only load this library when the feature is enabled.
384 std::string error; 378 std::string error;
385 base::LoadNativeLibrary(FilePath(L"crypt32.dll"), &error); 379 base::LoadNativeLibrary(FilePath(L"crypt32.dll"), &error);
386 #endif 380 #endif
387 381
388 // Note that under Linux, the media library will normally already have 382 // Note that under Linux, the media library will normally already have
389 // been initialized by the Zygote before this instance became a Renderer. 383 // been initialized by the Zygote before this instance became a Renderer.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // a new "delete everything" pass because object references make it difficult 496 // a new "delete everything" pass because object references make it difficult
503 // to free everything possible in just one pass. 497 // to free everything possible in just one pass.
504 while (!v8::V8::IdleNotification()) { 498 while (!v8::V8::IdleNotification()) {
505 } 499 }
506 500
507 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC) 501 #if !defined(OS_MACOSX) && defined(USE_TCMALLOC)
508 // Tell tcmalloc to release any free pages it's still holding. 502 // Tell tcmalloc to release any free pages it's still holding.
509 MallocExtension::instance()->ReleaseFreeMemory(); 503 MallocExtension::instance()->ReleaseFreeMemory();
510 #endif 504 #endif
511 } 505 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698