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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 340067: database_dispatcher_host changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Addressed Michael's latest comments. Created 11 years, 1 month 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/browser/profile.cc ('k') | chrome/browser/renderer_host/database_dispatcher_host.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 switches::kMessageLoopHistogrammer, 540 switches::kMessageLoopHistogrammer,
541 switches::kEnableDCHECK, 541 switches::kEnableDCHECK,
542 switches::kSilentDumpOnDCHECK, 542 switches::kSilentDumpOnDCHECK,
543 switches::kUseLowFragHeapCrt, 543 switches::kUseLowFragHeapCrt,
544 switches::kEnableStatsTable, 544 switches::kEnableStatsTable,
545 switches::kExperimentalSpellcheckerFeatures, 545 switches::kExperimentalSpellcheckerFeatures,
546 switches::kDisableAudio, 546 switches::kDisableAudio,
547 switches::kSimpleDataSource, 547 switches::kSimpleDataSource,
548 switches::kEnableBenchmarking, 548 switches::kEnableBenchmarking,
549 switches::kInternalNaCl, 549 switches::kInternalNaCl,
550 switches::kEnableDatabases,
551 switches::kDisableByteRangeSupport, 550 switches::kDisableByteRangeSupport,
552 switches::kDisableWebSockets, 551 switches::kDisableWebSockets,
553 switches::kDisableLocalStorage, 552 switches::kDisableLocalStorage,
554 switches::kEnableSessionStorage, 553 switches::kEnableSessionStorage,
555 switches::kEnableSharedWorkers, 554 switches::kEnableSharedWorkers,
556 switches::kEnableDesktopNotifications, 555 switches::kEnableDesktopNotifications,
557 switches::kEnableApplicationCache, 556 switches::kEnableApplicationCache,
558 // We propagate the Chrome Frame command line here as well in case the 557 // We propagate the Chrome Frame command line here as well in case the
559 // renderer is not run in the sandbox. 558 // renderer is not run in the sandbox.
560 switches::kChromeFrame, 559 switches::kChromeFrame,
561 #if defined(OS_MACOSX) 560 #if defined(OS_MACOSX)
562 // Allow this to be set when invoking the browser and relayed along. 561 // Allow this to be set when invoking the browser and relayed along.
563 switches::kEnableSandboxLogging, 562 switches::kEnableSandboxLogging,
564 #endif 563 #endif
565 }; 564 };
566 565
566 // Propagate the following switches to the renderer command line (along
567 // with any associated values) only if we're not in incognito mode.
568 static const char* const not_otr_switch_names[] = {
569 switches::kEnableDatabases,
570 };
571
567 for (size_t i = 0; i < arraysize(switch_names); ++i) { 572 for (size_t i = 0; i < arraysize(switch_names); ++i) {
568 if (browser_cmd.HasSwitch(switch_names[i])) { 573 if (browser_cmd.HasSwitch(switch_names[i])) {
569 renderer_cmd->AppendSwitchWithValue(switch_names[i], 574 renderer_cmd->AppendSwitchWithValue(switch_names[i],
570 browser_cmd.GetSwitchValueASCII(switch_names[i])); 575 browser_cmd.GetSwitchValueASCII(switch_names[i]));
571 } 576 }
572 } 577 }
578
579 if (!profile()->IsOffTheRecord()) {
580 for (size_t i = 0; i < arraysize(not_otr_switch_names); ++i) {
581 if (browser_cmd.HasSwitch(not_otr_switch_names[i])) {
582 renderer_cmd->AppendSwitchWithValue(not_otr_switch_names[i],
583 browser_cmd.GetSwitchValueASCII(not_otr_switch_names[i]));
584 }
585 }
586 }
573 } 587 }
574 588
575 #if defined(OS_WIN) 589 #if defined(OS_WIN)
576 590
577 base::ProcessHandle BrowserRenderProcessHost::ExecuteRenderer( 591 base::ProcessHandle BrowserRenderProcessHost::ExecuteRenderer(
578 CommandLine* cmd_line, 592 CommandLine* cmd_line,
579 bool has_cmd_prefix) { 593 bool has_cmd_prefix) {
580 return sandbox::StartProcess(cmd_line); 594 return sandbox::StartProcess(cmd_line);
581 } 595 }
582 596
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 channel_->Send(new ViewMsg_SpellChecker_Init( 1138 channel_->Send(new ViewMsg_SpellChecker_Init(
1125 base::FileDescriptor(), std::vector<std::string>(), std::string(), 1139 base::FileDescriptor(), std::vector<std::string>(), std::string(),
1126 false)); 1140 false));
1127 } 1141 }
1128 } 1142 }
1129 1143
1130 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { 1144 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) {
1131 channel_->Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); 1145 channel_->Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable));
1132 } 1146 }
1133 #endif 1147 #endif
OLDNEW
« no previous file with comments | « chrome/browser/profile.cc ('k') | chrome/browser/renderer_host/database_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698