| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(); | 319 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 320 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { | 320 if (command_line->HasSwitch(switches::kOriginTrialPublicKey)) { |
| 321 origin_trial_key_manager_.SetPublicKeyFromASCIIString( | 321 origin_trial_key_manager_.SetPublicKeyFromASCIIString( |
| 322 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); | 322 command_line->GetSwitchValueASCII(switches::kOriginTrialPublicKey)); |
| 323 } | 323 } |
| 324 if (command_line->HasSwitch(switches::kOriginTrialDisabledFeatures)) { |
| 325 origin_trial_key_manager_.SetDisabledFeatures( |
| 326 command_line->GetSwitchValueASCII( |
| 327 switches::kOriginTrialDisabledFeatures)); |
| 328 } |
| 324 } | 329 } |
| 325 | 330 |
| 326 ChromeContentRendererClient::~ChromeContentRendererClient() { | 331 ChromeContentRendererClient::~ChromeContentRendererClient() { |
| 327 } | 332 } |
| 328 | 333 |
| 329 void ChromeContentRendererClient::RenderThreadStarted() { | 334 void ChromeContentRendererClient::RenderThreadStarted() { |
| 330 RenderThread* thread = RenderThread::Get(); | 335 RenderThread* thread = RenderThread::Get(); |
| 331 | 336 |
| 332 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( | 337 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( |
| 333 main_entry_time_)); | 338 main_entry_time_)); |
| (...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 #if defined(ENABLE_EXTENSIONS) | 1429 #if defined(ENABLE_EXTENSIONS) |
| 1425 return !IsStandaloneExtensionProcess(); | 1430 return !IsStandaloneExtensionProcess(); |
| 1426 #else | 1431 #else |
| 1427 return true; | 1432 return true; |
| 1428 #endif | 1433 #endif |
| 1429 } | 1434 } |
| 1430 | 1435 |
| 1431 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { | 1436 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { |
| 1432 return origin_trial_key_manager_.GetPublicKey(); | 1437 return origin_trial_key_manager_.GetPublicKey(); |
| 1433 } | 1438 } |
| 1439 |
| 1440 bool ChromeContentRendererClient::IsOriginTrialFeatureDisabled( |
| 1441 const std::string& feature) { |
| 1442 return origin_trial_key_manager_.IsFeatureDisabled(feature); |
| 1443 } |
| OLD | NEW |