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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 2544133002: Add flags entries to test chrome OS component updates in release mode. (Closed)
Patch Set: Created 4 years 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
OLDNEW
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/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
11 #include <tuple> 11 #include <tuple>
12 12
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/debug/crash_logging.h" 14 #include "base/debug/crash_logging.h"
15 #include "base/files/file_util.h" 15 #include "base/files/file_util.h"
16 #include "base/json/json_reader.h" 16 #include "base/json/json_reader.h"
17 #include "base/memory/ptr_util.h" 17 #include "base/memory/ptr_util.h"
18 #include "base/native_library.h" 18 #include "base/native_library.h"
19 #include "base/path_service.h" 19 #include "base/path_service.h"
20 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
21 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_split.h" 22 #include "base/strings/string_split.h"
23 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
24 #include "base/strings/stringprintf.h" 24 #include "base/strings/stringprintf.h"
25 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
26 #include "build/build_config.h" 26 #include "build/build_config.h"
27 #include "chrome/common/child_process_logging.h" 27 #include "chrome/common/child_process_logging.h"
28 #include "chrome/common/chrome_constants.h" 28 #include "chrome/common/chrome_constants.h"
29 #include "chrome/common/chrome_features.h"
29 #include "chrome/common/chrome_paths.h" 30 #include "chrome/common/chrome_paths.h"
30 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/crash_keys.h" 32 #include "chrome/common/crash_keys.h"
32 #include "chrome/common/pepper_flash.h" 33 #include "chrome/common/pepper_flash.h"
33 #include "chrome/common/secure_origin_whitelist.h" 34 #include "chrome/common/secure_origin_whitelist.h"
34 #include "chrome/common/url_constants.h" 35 #include "chrome/common/url_constants.h"
35 #include "chrome/grit/common_resources.h" 36 #include "chrome/grit/common_resources.h"
36 #include "components/dom_distiller/core/url_constants.h" 37 #include "components/dom_distiller/core/url_constants.h"
37 #include "components/version_info/version_info.h" 38 #include "components/version_info/version_info.h"
38 #include "content/public/common/cdm_info.h" 39 #include "content/public/common/cdm_info.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 493
493 // Get component updated flash for desktop Linux and Chrome OS. 494 // Get component updated flash for desktop Linux and Chrome OS.
494 #if defined(OS_LINUX) 495 #if defined(OS_LINUX)
495 // Depending on the sandbox configuration, the file system 496 // Depending on the sandbox configuration, the file system
496 // is not always available. If it is not available, do not try and load any 497 // is not always available. If it is not available, do not try and load any
497 // flash plugin. The flash player, if any, preloaded before the sandbox 498 // flash plugin. The flash player, if any, preloaded before the sandbox
498 // initialization will continue to be used. 499 // initialization will continue to be used.
499 if (!sandbox::Credentials::HasFileSystemAccess()) 500 if (!sandbox::Credentials::HasFileSystemAccess())
500 return; 501 return;
501 502
503 #if defined(OS_CHROMEOS)
504 // On Chrome OS, we cannot test component flash updates reliably unless we
505 // guarantee that the component updated flash plugin will be used.
506 if (base::FeatureList::IsEnabled(features::kComponentFlashOnly)) {
507 auto component_flash = base::MakeUnique<content::PepperPluginInfo>();
508 if (GetComponentUpdatedPepperFlash(component_flash.get())) {
509 plugins->push_back(*component_flash);
510 }
511 return;
waffles 2016/12/01 23:51:18 I think it might be cleaner to instead do somethin
Greg K 2016/12/02 01:06:26 I think you're right. The override is less obvious
512 }
513 #endif // defined(OS_CHROMEOS)
514
502 auto component_flash = base::MakeUnique<content::PepperPluginInfo>(); 515 auto component_flash = base::MakeUnique<content::PepperPluginInfo>();
503 if (GetComponentUpdatedPepperFlash(component_flash.get())) 516 if (GetComponentUpdatedPepperFlash(component_flash.get()))
504 flash_versions.push_back(std::move(component_flash)); 517 flash_versions.push_back(std::move(component_flash));
505 #endif // defined(OS_LINUX) 518 #endif // defined(OS_LINUX)
506 519
507 auto command_line_flash = base::MakeUnique<content::PepperPluginInfo>(); 520 auto command_line_flash = base::MakeUnique<content::PepperPluginInfo>();
508 if (GetCommandLinePepperFlash(command_line_flash.get())) 521 if (GetCommandLinePepperFlash(command_line_flash.get()))
509 flash_versions.push_back(std::move(command_line_flash)); 522 flash_versions.push_back(std::move(command_line_flash));
510 523
511 auto system_flash = base::MakeUnique<content::PepperPluginInfo>(); 524 auto system_flash = base::MakeUnique<content::PepperPluginInfo>();
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 if (!origin_trial_policy_) 699 if (!origin_trial_policy_)
687 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); 700 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>();
688 return origin_trial_policy_.get(); 701 return origin_trial_policy_.get();
689 } 702 }
690 703
691 #if defined(OS_ANDROID) 704 #if defined(OS_ANDROID)
692 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 705 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
693 return new ChromeMediaClientAndroid(); 706 return new ChromeMediaClientAndroid();
694 } 707 }
695 #endif // OS_ANDROID 708 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/pepper_flash_component_installer.cc ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698