Remove PDFAnnotations flag altogether.
Just assume the feature is always enabled on Chrome OS. Bug: 1010663 Change-Id: I562d18a782dc8ba0e938698697f3beeccf2919d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2229317 Reviewed-by: dstockwell <dstockwell@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#775138}
This commit is contained in:
chrome
browser
about_flags.ccflag-metadata.jsonflag_descriptions.ccflag_descriptions.h
extensions
api
resources_private
pdf
test
pdf
@ -3845,12 +3845,6 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(omnibox::kQueryInOmnibox)},
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
#if defined(OS_CHROMEOS)
|
||||
{"pdf-annotations", flag_descriptions::kPdfAnnotations,
|
||||
flag_descriptions::kPdfAnnotationsDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(chrome_pdf::features::kPDFAnnotations)},
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
{"pdf-form-save", flag_descriptions::kPdfFormSaveName,
|
||||
flag_descriptions::kPdfFormSaveDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(chrome_pdf::features::kSaveEditedPDFForm)},
|
||||
|
@ -141,8 +141,7 @@ void AddAdditionalDataForPdf(base::DictionaryValue* dict) {
|
||||
#if defined(OS_CHROMEOS)
|
||||
// For Chrome OS, enable printing only if we are not at OOBE.
|
||||
enable_printing = !chromeos::LoginDisplayHost::default_host();
|
||||
enable_annotations =
|
||||
base::FeatureList::IsEnabled(chrome_pdf::features::kPDFAnnotations);
|
||||
enable_annotations = true;
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
dict->SetKey("printingEnabled", base::Value(enable_printing));
|
||||
dict->SetKey("pdfAnnotationsEnabled", base::Value(enable_annotations));
|
||||
|
@ -3547,11 +3547,6 @@
|
||||
"owners": ["mamir", "fhorschig"],
|
||||
"expiry_milestone": 85
|
||||
},
|
||||
{
|
||||
"name": "pdf-annotations",
|
||||
"owners": [ "dstockwell@google.com" ],
|
||||
"expiry_milestone": 76
|
||||
},
|
||||
{
|
||||
"name": "pdf-form-save",
|
||||
"owners": [ "thestig" ],
|
||||
|
@ -4089,11 +4089,6 @@ const char kPaintPreviewDemoDescription[] =
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
const char kPdfAnnotations[] = "PDF Annotations";
|
||||
const char kPdfAnnotationsDescription[] = "Enable annotating PDF documents.";
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
const char kPdfFormSaveName[] = "Save PDF Forms";
|
||||
const char kPdfFormSaveDescription[] =
|
||||
"Enable saving PDFs with filled form data.";
|
||||
|
@ -2418,11 +2418,6 @@ extern const char kPaintPreviewDemoDescription[];
|
||||
#endif // ENABLE_PAINT_PREVIEW && defined(OS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
#if defined(OS_CHROMEOS)
|
||||
extern const char kPdfAnnotations[];
|
||||
extern const char kPdfAnnotationsDescription[];
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
extern const char kPdfFormSaveName[];
|
||||
extern const char kPdfFormSaveDescription[];
|
||||
|
||||
|
@ -845,27 +845,10 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionJSTest, RedirectsFailInPlugin) {
|
||||
}
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
IN_PROC_BROWSER_TEST_F(PDFExtensionJSTest, AnnotationsFeatureDisabled) {
|
||||
RunTestsInJsModule("annotations_feature_disabled_test.js", "test.pdf");
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(PDFExtensionJSTest, Printing) {
|
||||
RunTestsInJsModule("printing_icon_test.js", "test.pdf");
|
||||
}
|
||||
|
||||
class PDFAnnotationsJSTest : public PDFExtensionJSTest {
|
||||
public:
|
||||
~PDFAnnotationsJSTest() override = default;
|
||||
|
||||
protected:
|
||||
void SetUpCommandLine(base::CommandLine* command_line) override {
|
||||
PDFExtensionJSTest::SetUpCommandLine(command_line);
|
||||
feature_list_.InitAndEnableFeature(chrome_pdf::features::kPDFAnnotations);
|
||||
}
|
||||
|
||||
base::test::ScopedFeatureList feature_list_;
|
||||
};
|
||||
|
||||
// TODO(https://crbug.com/920684): Test times out.
|
||||
#if defined(MEMORY_SANITIZER) || defined(LEAK_SANITIZER) || \
|
||||
defined(ADDRESS_SANITIZER) || defined(_DEBUG)
|
||||
@ -873,7 +856,7 @@ class PDFAnnotationsJSTest : public PDFExtensionJSTest {
|
||||
#else
|
||||
#define MAYBE_AnnotationsFeatureEnabled AnnotationsFeatureEnabled
|
||||
#endif
|
||||
IN_PROC_BROWSER_TEST_F(PDFAnnotationsJSTest, MAYBE_AnnotationsFeatureEnabled) {
|
||||
IN_PROC_BROWSER_TEST_F(PDFExtensionJSTest, MAYBE_AnnotationsFeatureEnabled) {
|
||||
RunTestsInJsModule("annotations_feature_enabled_test.js", "test.pdf");
|
||||
}
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
@ -1,21 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js';
|
||||
|
||||
chrome.test.runTests([
|
||||
function testAnnotationsDisabled() {
|
||||
const toolbar = document.body.querySelector('#toolbar');
|
||||
if (loadTimeData.getBoolean('pdfAnnotationsEnabled')) {
|
||||
chrome.test.assertTrue(!!toolbar.shadowRoot.querySelector('#annotate'));
|
||||
} else {
|
||||
chrome.test.assertFalse(!!toolbar.shadowRoot.querySelector('#annotate'));
|
||||
}
|
||||
chrome.test.succeed();
|
||||
},
|
||||
function testPromiseNotCreated() {
|
||||
chrome.test.assertEq(null, viewer.loaded);
|
||||
chrome.test.succeed();
|
||||
},
|
||||
]);
|
@ -1498,7 +1498,6 @@ void OutOfProcessInstance::SaveToBuffer(const std::string& token) {
|
||||
}
|
||||
} else {
|
||||
#if defined(OS_CHROMEOS)
|
||||
DCHECK(base::FeatureList::IsEnabled(features::kPDFAnnotations));
|
||||
uint32_t length = engine_->GetLoadedByteSize();
|
||||
if (IsSaveDataSizeValid(length)) {
|
||||
pp::VarArrayBuffer buffer(length);
|
||||
|
@ -33,10 +33,5 @@ const base::Feature kSaveEditedPDFForm = {"SaveEditedPDFForm",
|
||||
const base::Feature kTabAcrossPDFAnnotations = {
|
||||
"TabAcrossPDFAnnotations", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
const base::Feature kPDFAnnotations{"PDFAnnotations",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
#endif
|
||||
|
||||
} // namespace features
|
||||
} // namespace chrome_pdf
|
||||
|
@ -21,10 +21,6 @@ extern const base::Feature kPDFViewerUpdate;
|
||||
extern const base::Feature kSaveEditedPDFForm;
|
||||
extern const base::Feature kTabAcrossPDFAnnotations;
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
extern const base::Feature kPDFAnnotations;
|
||||
#endif
|
||||
|
||||
} // namespace features
|
||||
} // namespace chrome_pdf
|
||||
|
||||
|
Reference in New Issue
Block a user