| 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 "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/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 if (command_line->HasSwitch(switches::kInstantProcess)) | 329 if (command_line->HasSwitch(switches::kInstantProcess)) |
| 330 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get()); | 330 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get()); |
| 331 | 331 |
| 332 if (command_line->HasSwitch(switches::kPlaybackMode) || | 332 if (command_line->HasSwitch(switches::kPlaybackMode) || |
| 333 command_line->HasSwitch(switches::kRecordMode)) { | 333 command_line->HasSwitch(switches::kRecordMode)) { |
| 334 thread->RegisterExtension(extensions_v8::PlaybackExtension::Get()); | 334 thread->RegisterExtension(extensions_v8::PlaybackExtension::Get()); |
| 335 } | 335 } |
| 336 | 336 |
| 337 // TODO(guohui): needs to forward the new-profile-management switch to | 337 // TODO(guohui): needs to forward the new-profile-management switch to |
| 338 // renderer processes. | 338 // renderer processes. |
| 339 if (switches::IsNewProfileManagement()) | 339 if (switches::IsEnableAccountConsistency()) |
| 340 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get()); | 340 thread->RegisterExtension(extensions_v8::PrincipalsExtension::Get()); |
| 341 | 341 |
| 342 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages | 342 // chrome:, chrome-search:, chrome-devtools:, and chrome-distiller: pages |
| 343 // should not be accessible by normal content, and should also be unable to | 343 // should not be accessible by normal content, and should also be unable to |
| 344 // script anything but themselves (to help limit the damage that a corrupt | 344 // script anything but themselves (to help limit the damage that a corrupt |
| 345 // page could cause). | 345 // page could cause). |
| 346 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); | 346 WebString chrome_ui_scheme(ASCIIToUTF16(content::kChromeUIScheme)); |
| 347 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); | 347 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); |
| 348 | 348 |
| 349 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); | 349 WebString chrome_search_scheme(ASCIIToUTF16(chrome::kChromeSearchScheme)); |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1499 | 1499 |
| 1500 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) | 1500 if (IsExtensionOrSharedModuleWhitelisted(url, allowed_video_decode_origins_)) |
| 1501 return true; | 1501 return true; |
| 1502 | 1502 |
| 1503 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 1503 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 1504 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 1504 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
| 1505 #else | 1505 #else |
| 1506 return false; | 1506 return false; |
| 1507 #endif | 1507 #endif |
| 1508 } | 1508 } |
| OLD | NEW |