| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 #if defined(ENABLE_PLUGINS) | 309 #if defined(ENABLE_PLUGINS) |
| 310 for (size_t i = 0; i < arraysize(kPredefinedAllowedCameraDeviceOrigins); ++i) | 310 for (size_t i = 0; i < arraysize(kPredefinedAllowedCameraDeviceOrigins); ++i) |
| 311 allowed_camera_device_origins_.insert( | 311 allowed_camera_device_origins_.insert( |
| 312 kPredefinedAllowedCameraDeviceOrigins[i]); | 312 kPredefinedAllowedCameraDeviceOrigins[i]); |
| 313 for (size_t i = 0; i < arraysize(kPredefinedAllowedCompositorOrigins); ++i) | 313 for (size_t i = 0; i < arraysize(kPredefinedAllowedCompositorOrigins); ++i) |
| 314 allowed_compositor_origins_.insert(kPredefinedAllowedCompositorOrigins[i]); | 314 allowed_compositor_origins_.insert(kPredefinedAllowedCompositorOrigins[i]); |
| 315 #endif | 315 #endif |
| 316 #if defined(ENABLE_PRINTING) | 316 #if defined(ENABLE_PRINTING) |
| 317 printing::SetAgent(GetUserAgent()); | 317 printing::SetAgent(GetUserAgent()); |
| 318 #endif | 318 #endif |
| 319 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 320 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) |
| 321 origin_trial_key_manager_.SetPublicKeyFromASCIIString( |
| 322 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); |
| 319 } | 323 } |
| 320 | 324 |
| 321 ChromeContentRendererClient::~ChromeContentRendererClient() { | 325 ChromeContentRendererClient::~ChromeContentRendererClient() { |
| 322 } | 326 } |
| 323 | 327 |
| 324 void ChromeContentRendererClient::RenderThreadStarted() { | 328 void ChromeContentRendererClient::RenderThreadStarted() { |
| 325 RenderThread* thread = RenderThread::Get(); | 329 RenderThread* thread = RenderThread::Get(); |
| 326 | 330 |
| 327 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( | 331 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( |
| 328 main_entry_time_)); | 332 main_entry_time_)); |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 #if defined(ENABLE_EXTENSIONS) | 1423 #if defined(ENABLE_EXTENSIONS) |
| 1420 return !IsStandaloneExtensionProcess(); | 1424 return !IsStandaloneExtensionProcess(); |
| 1421 #else | 1425 #else |
| 1422 return true; | 1426 return true; |
| 1423 #endif | 1427 #endif |
| 1424 } | 1428 } |
| 1425 | 1429 |
| 1426 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { | 1430 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { |
| 1427 return origin_trial_key_manager_.GetPublicKey(); | 1431 return origin_trial_key_manager_.GetPublicKey(); |
| 1428 } | 1432 } |
| OLD | NEW |