Add about:flags entry for "pdf-form-save" feature.
Also put the "pdf-isolation" feature behind the same ifdef. These features should only be available when plugins are enabled at compile time. Bug: 61248 Change-Id: Ia928ea89d197d2f94d80e1e67c8ac8ece13548f8 Reviewed-on: https://chromium-review.googlesource.com/c/1330846 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Cr-Commit-Position: refs/heads/master@{#608046}
This commit is contained in:
chrome/browser
pdf
tools/metrics/histograms
@ -4294,6 +4294,7 @@ jumbo_split_static_library("browser") {
|
|||||||
deps += [
|
deps += [
|
||||||
"//components/pdf/browser",
|
"//components/pdf/browser",
|
||||||
"//media:media_buildflags",
|
"//media:media_buildflags",
|
||||||
|
"//pdf:features",
|
||||||
"//ppapi/buildflags",
|
"//ppapi/buildflags",
|
||||||
"//ppapi/proxy:ipc",
|
"//ppapi/proxy:ipc",
|
||||||
"//services/device/public/mojom",
|
"//services/device/public/mojom",
|
||||||
|
@ -177,6 +177,10 @@
|
|||||||
#include "extensions/common/switches.h"
|
#include "extensions/common/switches.h"
|
||||||
#endif // ENABLE_EXTENSIONS
|
#endif // ENABLE_EXTENSIONS
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
#include "pdf/pdf_features.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(USE_OZONE)
|
#if defined(USE_OZONE)
|
||||||
#include "ui/ozone/public/ozone_switches.h"
|
#include "ui/ozone/public/ozone_switches.h"
|
||||||
#endif // USE_OZONE
|
#endif // USE_OZONE
|
||||||
@ -3846,9 +3850,15 @@ const FeatureEntry kFeatureEntries[] = {
|
|||||||
flag_descriptions::kVizHitTestDrawQuadDescription, kOsAll,
|
flag_descriptions::kVizHitTestDrawQuadDescription, kOsAll,
|
||||||
FEATURE_VALUE_TYPE(features::kEnableVizHitTestDrawQuad)},
|
FEATURE_VALUE_TYPE(features::kEnableVizHitTestDrawQuad)},
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
{"pdf-form-save", flag_descriptions::kPdfFormSaveName,
|
||||||
|
flag_descriptions::kPdfFormSaveDescription, kOsDesktop,
|
||||||
|
FEATURE_VALUE_TYPE(chrome_pdf::features::kSaveEditedPDFForm)},
|
||||||
|
|
||||||
{"pdf-isolation", flag_descriptions::kPdfIsolationName,
|
{"pdf-isolation", flag_descriptions::kPdfIsolationName,
|
||||||
flag_descriptions::kPdfIsolationDescription, kOsDesktop,
|
flag_descriptions::kPdfIsolationDescription, kOsDesktop,
|
||||||
FEATURE_VALUE_TYPE(features::kPdfIsolation)},
|
FEATURE_VALUE_TYPE(features::kPdfIsolation)},
|
||||||
|
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PRINTING)
|
#if BUILDFLAG(ENABLE_PRINTING)
|
||||||
{"use-pdf-compositor-service-for-print",
|
{"use-pdf-compositor-service-for-print",
|
||||||
|
@ -1543,10 +1543,6 @@ const char kPasswordsMigrateLinuxToLoginDBDescription[] =
|
|||||||
"Performs a one-off irreversible migration of passwords from the "
|
"Performs a one-off irreversible migration of passwords from the "
|
||||||
"gnome-keyring or kwallet into the profile directory.";
|
"gnome-keyring or kwallet into the profile directory.";
|
||||||
|
|
||||||
const char kPdfIsolationName[] = "PDF Isolation";
|
|
||||||
const char kPdfIsolationDescription[] =
|
|
||||||
"Render PDF files from different origins in different plugin processes.";
|
|
||||||
|
|
||||||
const char kPerMethodCanMakePaymentQuotaName[] =
|
const char kPerMethodCanMakePaymentQuotaName[] =
|
||||||
"Per-method canMakePayment() quota.";
|
"Per-method canMakePayment() quota.";
|
||||||
const char kPerMethodCanMakePaymentQuotaDescription[] =
|
const char kPerMethodCanMakePaymentQuotaDescription[] =
|
||||||
@ -3793,6 +3789,18 @@ const char kPnaclSubzeroDescription[] =
|
|||||||
|
|
||||||
#endif // BUILDFLAG(ENABLE_NACL)
|
#endif // BUILDFLAG(ENABLE_NACL)
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
|
||||||
|
const char kPdfFormSaveName[] = "Save PDF Forms";
|
||||||
|
const char kPdfFormSaveDescription[] =
|
||||||
|
"Enable saving PDFs with filled form data.";
|
||||||
|
|
||||||
|
const char kPdfIsolationName[] = "PDF Isolation";
|
||||||
|
const char kPdfIsolationDescription[] =
|
||||||
|
"Render PDF files from different origins in different plugin processes.";
|
||||||
|
|
||||||
|
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
|
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
|
||||||
|
|
||||||
const char kAutofillCreditCardUploadName[] =
|
const char kAutofillCreditCardUploadName[] =
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "components/nacl/common/buildflags.h"
|
#include "components/nacl/common/buildflags.h"
|
||||||
#include "device/vr/buildflags/buildflags.h"
|
#include "device/vr/buildflags/buildflags.h"
|
||||||
#include "media/media_buildflags.h"
|
#include "media/media_buildflags.h"
|
||||||
|
#include "ppapi/buildflags/buildflags.h"
|
||||||
|
|
||||||
// This file declares strings used in chrome://flags. These messages are not
|
// This file declares strings used in chrome://flags. These messages are not
|
||||||
// translated, because instead of end-users they target Chromium developers and
|
// translated, because instead of end-users they target Chromium developers and
|
||||||
@ -938,9 +939,6 @@ extern const char kPasswordsKeyboardAccessoryDescription[];
|
|||||||
extern const char kPasswordsMigrateLinuxToLoginDBName[];
|
extern const char kPasswordsMigrateLinuxToLoginDBName[];
|
||||||
extern const char kPasswordsMigrateLinuxToLoginDBDescription[];
|
extern const char kPasswordsMigrateLinuxToLoginDBDescription[];
|
||||||
|
|
||||||
extern const char kPdfIsolationName[];
|
|
||||||
extern const char kPdfIsolationDescription[];
|
|
||||||
|
|
||||||
extern const char kPerMethodCanMakePaymentQuotaName[];
|
extern const char kPerMethodCanMakePaymentQuotaName[];
|
||||||
extern const char kPerMethodCanMakePaymentQuotaDescription[];
|
extern const char kPerMethodCanMakePaymentQuotaDescription[];
|
||||||
|
|
||||||
@ -2300,6 +2298,16 @@ extern const char kPnaclSubzeroDescription[];
|
|||||||
|
|
||||||
#endif // BUILDFLAG(ENABLE_NACL)
|
#endif // BUILDFLAG(ENABLE_NACL)
|
||||||
|
|
||||||
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
|
||||||
|
extern const char kPdfFormSaveName[];
|
||||||
|
extern const char kPdfFormSaveDescription[];
|
||||||
|
|
||||||
|
extern const char kPdfIsolationName[];
|
||||||
|
extern const char kPdfIsolationDescription[];
|
||||||
|
|
||||||
|
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||||
|
|
||||||
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
|
#if defined(TOOLKIT_VIEWS) || defined(OS_ANDROID)
|
||||||
|
|
||||||
extern const char kAutofillCreditCardUploadName[];
|
extern const char kAutofillCreditCardUploadName[];
|
||||||
|
17
pdf/BUILD.gn
17
pdf/BUILD.gn
@ -33,6 +33,7 @@ if (enable_pdf) {
|
|||||||
jumbo_static_library("pdf") {
|
jumbo_static_library("pdf") {
|
||||||
configs += [ ":pdf_common_config" ]
|
configs += [ ":pdf_common_config" ]
|
||||||
deps = [
|
deps = [
|
||||||
|
":features",
|
||||||
"//base",
|
"//base",
|
||||||
"//gin",
|
"//gin",
|
||||||
"//net",
|
"//net",
|
||||||
@ -112,6 +113,22 @@ if (enable_pdf) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source_set("features") {
|
||||||
|
configs += [ ":pdf_common_config" ]
|
||||||
|
deps = [
|
||||||
|
"//base",
|
||||||
|
]
|
||||||
|
|
||||||
|
public = [
|
||||||
|
"pdf_features.h",
|
||||||
|
]
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"pdf_features.cc",
|
||||||
|
"pdf_features.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
source_set("pdf_test_utils") {
|
source_set("pdf_test_utils") {
|
||||||
testonly = true
|
testonly = true
|
||||||
sources = [
|
sources = [
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "chrome/common/content_restriction.h"
|
#include "chrome/common/content_restriction.h"
|
||||||
#include "net/base/escape.h"
|
#include "net/base/escape.h"
|
||||||
#include "pdf/pdf.h"
|
#include "pdf/pdf.h"
|
||||||
|
#include "pdf/pdf_features.h"
|
||||||
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
|
#include "ppapi/c/dev/ppb_cursor_control_dev.h"
|
||||||
#include "ppapi/c/pp_errors.h"
|
#include "ppapi/c/pp_errors.h"
|
||||||
#include "ppapi/c/pp_rect.h"
|
#include "ppapi/c/pp_rect.h"
|
||||||
@ -50,9 +51,6 @@ namespace chrome_pdf {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const base::Feature kSaveEditedPDFFormExperiment{
|
|
||||||
"SaveEditedPDFForm", base::FEATURE_DISABLED_BY_DEFAULT};
|
|
||||||
|
|
||||||
constexpr char kChromePrint[] = "chrome://print/";
|
constexpr char kChromePrint[] = "chrome://print/";
|
||||||
constexpr char kChromeExtension[] =
|
constexpr char kChromeExtension[] =
|
||||||
"chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai";
|
"chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai";
|
||||||
@ -1501,7 +1499,7 @@ void OutOfProcessInstance::GetDocumentPassword(
|
|||||||
void OutOfProcessInstance::Save(const std::string& token) {
|
void OutOfProcessInstance::Save(const std::string& token) {
|
||||||
engine_->KillFormFocus();
|
engine_->KillFormFocus();
|
||||||
|
|
||||||
if (!base::FeatureList::IsEnabled(kSaveEditedPDFFormExperiment) ||
|
if (!base::FeatureList::IsEnabled(features::kSaveEditedPDFForm) ||
|
||||||
!edit_mode_) {
|
!edit_mode_) {
|
||||||
ConsumeSaveToken(token);
|
ConsumeSaveToken(token);
|
||||||
pp::PDF::SaveAs(this);
|
pp::PDF::SaveAs(this);
|
||||||
|
14
pdf/pdf_features.cc
Normal file
14
pdf/pdf_features.cc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
#include "pdf/pdf_features.h"
|
||||||
|
|
||||||
|
namespace chrome_pdf {
|
||||||
|
namespace features {
|
||||||
|
|
||||||
|
const base::Feature kSaveEditedPDFForm{"SaveEditedPDFForm",
|
||||||
|
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||||
|
|
||||||
|
} // namespace features
|
||||||
|
} // namespace chrome_pdf
|
21
pdf/pdf_features.h
Normal file
21
pdf/pdf_features.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// This file defines all the public base::FeatureList features for the pdf
|
||||||
|
// module.
|
||||||
|
|
||||||
|
#ifndef PDF_PDF_FEATURES_H_
|
||||||
|
#define PDF_PDF_FEATURES_H_
|
||||||
|
|
||||||
|
#include "base/feature_list.h"
|
||||||
|
|
||||||
|
namespace chrome_pdf {
|
||||||
|
namespace features {
|
||||||
|
|
||||||
|
extern const base::Feature kSaveEditedPDFForm;
|
||||||
|
|
||||||
|
} // namespace features
|
||||||
|
} // namespace chrome_pdf
|
||||||
|
|
||||||
|
#endif // PDF_PDF_FEATURES_H_
|
@ -30970,6 +30970,7 @@ from previous Chrome versions.
|
|||||||
label="OmniboxUIExperimentHideSuggestionUrlTrivialSubdomains:disabled"/>
|
label="OmniboxUIExperimentHideSuggestionUrlTrivialSubdomains:disabled"/>
|
||||||
<int value="1389729816" label="data-reduction-proxy-lo-fi"/>
|
<int value="1389729816" label="data-reduction-proxy-lo-fi"/>
|
||||||
<int value="1393500952" label="EnableVirtualKeyboardUkm:disabled"/>
|
<int value="1393500952" label="EnableVirtualKeyboardUkm:disabled"/>
|
||||||
|
<int value="1393722373" label="SaveEditedPDFForm:disabled"/>
|
||||||
<int value="1397069250" label="NetworkService:disabled"/>
|
<int value="1397069250" label="NetworkService:disabled"/>
|
||||||
<int value="1403195370" label="ArcCupsApi:enabled"/>
|
<int value="1403195370" label="ArcCupsApi:enabled"/>
|
||||||
<int value="1405459667" label="enable-fast-text-autosizing"/>
|
<int value="1405459667" label="enable-fast-text-autosizing"/>
|
||||||
@ -31099,6 +31100,7 @@ from previous Chrome versions.
|
|||||||
<int value="1639314588" label="LookalikeUrlNavigationSuggestions:disabled"/>
|
<int value="1639314588" label="LookalikeUrlNavigationSuggestions:disabled"/>
|
||||||
<int value="1640386037" label="ContextualSuggestionsSlimPeekUI:disabled"/>
|
<int value="1640386037" label="ContextualSuggestionsSlimPeekUI:disabled"/>
|
||||||
<int value="1646498561" label="OfflineBookmarks:disabled"/>
|
<int value="1646498561" label="OfflineBookmarks:disabled"/>
|
||||||
|
<int value="1651141490" label="SaveEditedPDFForm:enabled"/>
|
||||||
<int value="1657713458" label="disable-virtual-keyboard-overscroll"/>
|
<int value="1657713458" label="disable-virtual-keyboard-overscroll"/>
|
||||||
<int value="1658644418" label="disable-app-list-voice-search"/>
|
<int value="1658644418" label="disable-app-list-voice-search"/>
|
||||||
<int value="1659082220" label="EnableManualSaving:disabled"/>
|
<int value="1659082220" label="EnableManualSaving:disabled"/>
|
||||||
|
Reference in New Issue
Block a user