New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 827016 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocking:
issue 809296
issue 812399



Sign in to add a comment

Ensure that CupsPrintersManager behaves correctly for UserNativePrintersAllowed

Project Member Reported by skau@chromium.org, Mar 29 2018

Issue description

When UserPrintersAllowed is false, users should not be able to use printers that were not configured by their administrator.  So, only printers of type kEnterprise should be available.  This should be checked in Print Preview and settings.
 

Comment 1 by skau@chromium.org, Mar 29 2018

Labels: -Type-Bug Type-Feature

Comment 2 by skau@chromium.org, Mar 29 2018

Blocking: 809296

Comment 3 by skau@chromium.org, Mar 29 2018

Blocking: 812399
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c7ab5772b42a49671e6d9c3f4e263b6e35b04447

commit c7ab5772b42a49671e6d9c3f4e263b6e35b04447
Author: David Valleau <valleau@chromium.org>
Date: Fri Mar 30 19:39:06 2018

Changing CupsPrintersManager to use Enterprise Printing Policy

Hooked up CupsPrintersManager to receive update callbacks whenever the
value of the UserPrintersAllowed pref is changed. If the pref is set to
false then CupsPrintersManager will disallow any changes made to
non-enterprise printers.

R=skau@chromium.org

CQ-DEPEND=CL:972627

Bug:  827016 
Change-Id: Id35de08fee33106f0122af07eea572757aae9c5f
Reviewed-on: https://chromium-review.googlesource.com/982273
Commit-Queue: David Valleau <valleau@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547243}
[modify] https://crrev.com/c7ab5772b42a49671e6d9c3f4e263b6e35b04447/chrome/browser/chromeos/printing/cups_printers_manager.cc
[modify] https://crrev.com/c7ab5772b42a49671e6d9c3f4e263b6e35b04447/chrome/browser/chromeos/printing/cups_printers_manager.h
[modify] https://crrev.com/c7ab5772b42a49671e6d9c3f4e263b6e35b04447/chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc

Comment 5 by skau@chromium.org, Mar 31 2018

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11df4514ddd778370c2316a3acb1b6da772d5291

commit 11df4514ddd778370c2316a3acb1b6da772d5291
Author: Chris Mumford <cmumford@chromium.org>
Date: Mon Apr 02 18:51:37 2018

Revert "Changing CupsPrintersManager to use Enterprise Printing Policy"

This reverts commit c7ab5772b42a49671e6d9c3f4e263b6e35b04447.

Reason for revert: Failing Linux ASan/LSan tests:

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0xb77492 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3
    #1 0xa3bea84 in __allocate buildtools/third_party/libc++/trunk/include/new:228:10
    #2 0xa3bea84 in allocate buildtools/third_party/libc++/trunk/include/memory:1793
    #3 0xa3bea84 in allocate buildtools/third_party/libc++/trunk/include/memory:1547
    #4 0xa3bea84 in __split_buffer buildtools/third_party/libc++/trunk/include/__split_buffer:311
    #5 0xa3bea84 in void std::__1::vector<PrefStore::Observer*, std::__1::allocator<PrefStore::Observer*> >::__push_back_slow_path<PrefStore::Observer* const&>(PrefStore::Observer* const&&&) buildtools/third_party/libc++/trunk/include/vector:1578
    #6 0xa3b5797 in push_back buildtools/third_party/libc++/trunk/include/vector:1599:9
    #7 0xa3b5797 in base::ObserverList<PrefStore::Observer, true, true>::AddObserver(PrefStore::Observer*) base/observer_list.h:246
    #8 0x162f16a5 in PrefValueStore::PrefStoreKeeper::Initialize(PrefValueStore*, PrefStore*, PrefValueStore::PrefStoreType) components/prefs/pref_value_store.cc:36:18
    #9 0x162f1e2a in InitPrefStore components/prefs/pref_value_store.cc:295:22
    #10 0x162f1e2a in PrefValueStore::PrefValueStore(PrefStore*, PrefStore*, PrefStore*, PrefStore*, PrefStore*, PrefStore*, PrefStore*, PrefNotifier*, std::__1::unique_ptr<PrefValueStore::Delegate, std::__1::default_delete<PrefValueStore::Delegate> >) components/prefs/pref_value_store.cc:61
    #11 0x24a286b6 in make_unique<PrefValueStore, TestingPrefStore *&, nullptr_t, TestingPrefStore *&, nullptr_t, TestingPrefStore *&, TestingPrefStore *&, PrefStore *, PrefNotifierImpl *&> buildtools/third_party/libc++/trunk/include/memory:3079:32
    #12 0x24a286b6 in TestingPrefServiceBase<sync_preferences::PrefServiceSyncable, user_prefs::PrefRegistrySyncable>::TestingPrefServiceBase(TestingPrefStore*, TestingPrefStore*, TestingPrefStore*, TestingPrefStore*, user_prefs::PrefRegistrySyncable*, PrefNotifierImpl*) components/sync_preferences/testing_pref_service_syncable.cc:24
    #13 0x24a28d10 in sync_preferences::TestingPrefServiceSyncable::TestingPrefServiceSyncable() components/sync_preferences/testing_pref_service_syncable.cc:47:7
    #14 0x7195215 in chromeos::(anonymous namespace)::CupsPrintersManagerTest::CupsPrintersManagerTest() chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc:256:27
    #15 0x71ac20e in CupsPrintersManagerTest_GetPrinter_Test chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc:477:1
    #16 0x71ac20e in testing::internal::TestFactoryImpl<chromeos::(anonymous namespace)::CupsPrintersManagerTest_GetPrinter_Test>::CreateTest() third_party/googletest/src/googletest/include/gtest/internal/gtest-internal.h:466
    #17 0x7a50817 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest-internal-inl.h
    #18 0x7a51c56 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28
    #19 0x7a77366 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43
    #20 0x7a765d6 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc
    #21 0x116d296b in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46
    #22 0x116d296b in base::TestSuite::Run() base/test/test_suite.cc:275
    #23 0x116d8c84 in Run base/callback.h:95:12
    #24 0x116d8c84 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225
    #25 0x116d874d in base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10
    #26 0x116b4b87 in main chrome/test/base/run_all_unittests.cc:30:10
    #27 0x7eff3bb53f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287

Original change's description:
> Changing CupsPrintersManager to use Enterprise Printing Policy
> 
> Hooked up CupsPrintersManager to receive update callbacks whenever the
> value of the UserPrintersAllowed pref is changed. If the pref is set to
> false then CupsPrintersManager will disallow any changes made to
> non-enterprise printers.
> 
> R=​skau@chromium.org
> 
> CQ-DEPEND=CL:972627
> 
> Bug:  827016 
> Change-Id: Id35de08fee33106f0122af07eea572757aae9c5f
> Reviewed-on: https://chromium-review.googlesource.com/982273
> Commit-Queue: David Valleau <valleau@chromium.org>
> Reviewed-by: Drew Wilson <atwilson@chromium.org>
> Reviewed-by: Sean Kau <skau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#547243}

TBR=atwilson@chromium.org,skau@chromium.org,valleau@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  827016 
Change-Id: I641993fa4ca9e35901a6c95a9312ec802220eef4
Reviewed-on: https://chromium-review.googlesource.com/990313
Reviewed-by: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Commit-Queue: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547475}
[modify] https://crrev.com/11df4514ddd778370c2316a3acb1b6da772d5291/chrome/browser/chromeos/printing/cups_printers_manager.cc
[modify] https://crrev.com/11df4514ddd778370c2316a3acb1b6da772d5291/chrome/browser/chromeos/printing/cups_printers_manager.h
[modify] https://crrev.com/11df4514ddd778370c2316a3acb1b6da772d5291/chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ee3a46f962a39454d68cb6a4a135f244ea734ec

commit 6ee3a46f962a39454d68cb6a4a135f244ea734ec
Author: David Valleau <valleau@chromium.org>
Date: Wed Apr 04 03:23:28 2018

Reland "Changing CupsPrintersManager to use Enterprise Printing Policy"

This reverts commit 11df4514ddd778370c2316a3acb1b6da772d5291.

Hooked up CupsPrintersManager to receive update callbacks whenever the
value of the UserPrintersAllowed pref is changed. If the pref is set to
false then CupsPrintersManager will disallow any changes made to
non-enterprise printers.

Bug:  827016 

Change-Id: Ibcb047f12e0db6414a25e32e5c9909608979c828
Reviewed-on: https://chromium-review.googlesource.com/992857
Commit-Queue: David Valleau <valleau@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547968}
[modify] https://crrev.com/6ee3a46f962a39454d68cb6a4a135f244ea734ec/chrome/browser/chromeos/printing/cups_printers_manager.cc
[modify] https://crrev.com/6ee3a46f962a39454d68cb6a4a135f244ea734ec/chrome/browser/chromeos/printing/cups_printers_manager.h
[modify] https://crrev.com/6ee3a46f962a39454d68cb6a4a135f244ea734ec/chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc

Sign in to add a comment