New issue
Advanced search Search tips

Issue 781765 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug

Blocked on:
issue 819204
issue 819218

Blocking:
issue 808680



Sign in to add a comment

Record important consent moments

Project Member Reported by msramek@chromium.org, Nov 6 2017

Issue description

For features that require a user consent in order to be enabled, recording the text of the consent moment (and not just the boolean enabled/disabled) will allow us to discover and address cases when the text was incorrect, mistranslated, etc.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 13 2017

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

commit 0d86260a47d1f6f55545cfa51fc77b5d49179ed0
Author: Martin Sramek <msramek@chromium.org>
Date: Mon Nov 13 12:09:20 2017

Consent auditor prototype

This is a prototype of the consent auditor component.

This CL only lays out the component and adds the functionality to
record local consent plus tests.

The functionality to record consents in the user's Google account,
and any callsites, will come in subsequent CLs.

See the design doc for background:
https://docs.google.com/document/d/1Iu040VPbAPdulCpvbnOu1HLh0nXNJfuNMAEckdwmHWQ/

Bug: 781765
Change-Id: I1aef65249afe98c20db7aa692a7c3a007069e56b
Reviewed-on: https://chromium-review.googlesource.com/731423
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515929}
[modify] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/chrome/browser/BUILD.gn
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/chrome/browser/consent_auditor/OWNERS
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/chrome/browser/consent_auditor/consent_auditor_factory.cc
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/chrome/browser/consent_auditor/consent_auditor_factory.h
[modify] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
[modify] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/BUILD.gn
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/BUILD.gn
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/DEPS
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/OWNERS
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/README.md
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/consent_auditor.cc
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/consent_auditor.h
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/consent_auditor_unittest.cc
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/pref_names.cc
[add] https://crrev.com/0d86260a47d1f6f55545cfa51fc77b5d49179ed0/components/consent_auditor/pref_names.h

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 13 2017

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

commit ab7776ffcbfbf44cd4b6c2bf1ecf0adceb91207b
Author: Martin Sramek <msramek@chromium.org>
Date: Mon Nov 13 13:46:46 2017

Record the application locale in local consents.

This should not change during Chrome runtime, and thus is passed
directly from the factory, similarly as we do for product version.

Since we use the term "app locale", for consistency we also rename
"product version" into "app version".

Finally, as this addition caused even more repetition in tests, some
common functionality has been extracted, and on the way, the ordering
of expectations fixed.

BASE: 731423
Bug: 781765
Change-Id: Id8093692a0cadd0d3ac127266dc9a814e780f602
Reviewed-on: https://chromium-review.googlesource.com/763510
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515940}
[modify] https://crrev.com/ab7776ffcbfbf44cd4b6c2bf1ecf0adceb91207b/chrome/browser/consent_auditor/consent_auditor_factory.cc
[modify] https://crrev.com/ab7776ffcbfbf44cd4b6c2bf1ecf0adceb91207b/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/ab7776ffcbfbf44cd4b6c2bf1ecf0adceb91207b/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/ab7776ffcbfbf44cd4b6c2bf1ecf0adceb91207b/components/consent_auditor/consent_auditor_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Nov 21 2017

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

commit 797dde20040933204cf4288f8630807d449b884a
Author: Christian Dullweber <dullweber@chromium.org>
Date: Tue Nov 21 16:53:43 2017

Add ConsentAuditor::RecordGaiaConsent()

Add an empty method for consent recording to define the api.

Bug: 781765
Change-Id: I36663814a004ad07015218797683f78519606e37
Reviewed-on: https://chromium-review.googlesource.com/781500
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518281}
[modify] https://crrev.com/797dde20040933204cf4288f8630807d449b884a/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/797dde20040933204cf4288f8630807d449b884a/components/consent_auditor/consent_auditor.h

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 27 2017

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 5 2017

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

commit 34367313a0c5fd778a1ed7b028d8444a7c674204
Author: Christian Dullweber <dullweber@chromium.org>
Date: Tue Dec 05 11:57:33 2017

Implement ConsentRecording using UserEventService

Create a UserConsent object and pass it to the UserEventService.
UserConsent objects are whitelisted to not require history sync
permission as they don't contain history data. They are also
whitelisted to be sent for users who have a passphrase.

Bug: 781765
Change-Id: I13800d9b3a28d3acf44052011adcaa3d7ca172fa
Reviewed-on: https://chromium-review.googlesource.com/785912
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521671}
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/consent_auditor/BUILD.gn
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/consent_auditor/consent_auditor_unittest.cc
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/sync/driver/sync_driver_switches.cc
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/sync/driver/sync_driver_switches.h
[modify] https://crrev.com/34367313a0c5fd778a1ed7b028d8444a7c674204/components/sync/user_events/user_event_service_impl_unittest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 4 2018

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

commit 44643e373654876c05b94b901aa621db44f9440c
Author: Christian Dullweber <dullweber@chromium.org>
Date: Thu Jan 04 09:09:02 2018

Add UNSPECIFIED to UserConsent::ConsentStatus enum

It is best practice to have UNSPECIFIED as first value in an enum for
consistent behavior between proto2 and proto3.
No one is sending these events yet, so changing the proto should
be fine.

Bug: 781765
Change-Id: I0b045b8654462f694620144a3f83817043c0e914
Reviewed-on: https://chromium-review.googlesource.com/848973
Reviewed-by: Sky Malice <skym@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526941}
[modify] https://crrev.com/44643e373654876c05b94b901aa621db44f9440c/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/44643e373654876c05b94b901aa621db44f9440c/components/sync/protocol/proto_enum_conversions.cc
[modify] https://crrev.com/44643e373654876c05b94b901aa621db44f9440c/components/sync/protocol/user_event_specifics.proto

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 2 2018

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

commit ab0302632225a4abebba338f4a834d3ae9652901
Author: Martin Sramek <msramek@chromium.org>
Date: Fri Feb 02 01:08:52 2018

Fix the singleton in ConsentAuditorFactory

ConsentAuditorFactory used CR_DEFINE_STATIC_LOCAL to define a singleton.
In single-process tests, this results in the factory surviving between
subsequent test runs.

Instead, use base::Singleton which is destroyed and recreated with the
test fixture.

Bug: 781765
Change-Id: I46374d6c28ece58eec764db3ff4fa5cffd43216b
Reviewed-on: https://chromium-review.googlesource.com/897947
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533885}
[modify] https://crrev.com/ab0302632225a4abebba338f4a834d3ae9652901/chrome/browser/consent_auditor/consent_auditor_factory.cc
[modify] https://crrev.com/ab0302632225a4abebba338f4a834d3ae9652901/chrome/browser/consent_auditor/consent_auditor_factory.h

Blocking: 808680
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 12 2018

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

commit 0c6d7bd5396e7e880b898381d2e5626a19ffeb4c
Author: Martin Sramek <msramek@chromium.org>
Date: Mon Feb 12 20:53:47 2018

Update the consent auditor proto according to the latest discussions

- Replace feature name string with enum
- Remove the string placeholder replacements
- Rename GIVEN/REVOKED to GIVEN/NOT_GIVEN

Note that the server is not in production yet, so changing the proto
on the spot is safe.

Bug: 781765
Change-Id: Ie70f8cabe041fc649c18efe3bc11a9b5d1234304
Reviewed-on: https://chromium-review.googlesource.com/902048
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Markus Heintz <markusheintz@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536183}
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/consent_auditor/consent_auditor_unittest.cc
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/sync/protocol/proto_enum_conversions.cc
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/sync/protocol/proto_enum_conversions.h
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/sync/protocol/proto_enum_conversions_unittest.cc
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/sync/protocol/proto_visitors.h
[modify] https://crrev.com/0c6d7bd5396e7e880b898381d2e5626a19ffeb4c/components/sync/protocol/user_event_specifics.proto

Project Member

Comment 10 by bugdroid1@chromium.org, Feb 13 2018

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

commit 12e745e11be2fad7863a114cd734c4a42bcac7de
Author: Martin Sramek <msramek@chromium.org>
Date: Tue Feb 13 11:23:43 2018

Add markusheintz@ as a consent_auditor/ OWNER.

Bug: 781765
Change-Id: I9b81c47b604bfa6f57a34ae4bca3c87955bb1ea3
Reviewed-on: https://chromium-review.googlesource.com/870212
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Markus Heintz <markusheintz@chromium.org>
Commit-Queue: Markus Heintz <markusheintz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536335}
[modify] https://crrev.com/12e745e11be2fad7863a114cd734c4a42bcac7de/components/consent_auditor/OWNERS

Project Member

Comment 11 by bugdroid1@chromium.org, Feb 15 2018

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

commit 5846d14878d5ecd942a3f1afd3e65e4823ef8b4f
Author: Martin Sramek <msramek@chromium.org>
Date: Thu Feb 15 19:41:05 2018

Measure the number of times a consent is recorded for a feature.

Currently, consent auditor only supports one feature (Chrome Sync), but
we use the enum-type histogram for extensibility in the future.

As this histogram didn't fit into existing categories, a new top-level
category "Privacy" is introduced.

TBR=markusheintz@chromium.org

Bug: 781765
Change-Id: I6e4d93e1a45ce1f06e4d18b0cb6e5fa5b4673273
Reviewed-on: https://chromium-review.googlesource.com/911572
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537103}
[modify] https://crrev.com/5846d14878d5ecd942a3f1afd3e65e4823ef8b4f/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/5846d14878d5ecd942a3f1afd3e65e4823ef8b4f/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/5846d14878d5ecd942a3f1afd3e65e4823ef8b4f/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/5846d14878d5ecd942a3f1afd3e65e4823ef8b4f/tools/metrics/histograms/histograms.xml

Project Member

Comment 12 by bugdroid1@chromium.org, Feb 26 2018

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

commit fa4a89496b423166220c562cee70bc9ff0490a54
Author: Martin Sramek <msramek@chromium.org>
Date: Mon Feb 26 17:47:42 2018

Record the signin / sync consent on Desktop.

The HTML file presenting the UI is annotated with attributes marking
which UI elements carry the consent description and confirmation.
When the user consents, the text is retrieved and converted to
GRD IDs which are then recorded.

This is done for the old dialog, as well as the DICE one.

Tests:
- Unittest to verify that SyncConfirmationHandler translates the resource
  names to ConsentAuditor correctly
- Browsertest to verify that the correct set of strings is passed from
  the DICe dialog
- Tested manually for both DICe and the old dialog.

See the design doc:
https://docs.google.com/document/d/1Psl9VJ4Dbc1Dh5bXCTa85OF1_DE3viTTHYwybu3V6Uk/edit#heading=h.l9ok1t7qgp5p
for more details.

Bug: 781765
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Id1ed846aa1151dc9f074f1299b54d814c21a6cc0
Reviewed-on: https://chromium-review.googlesource.com/897948
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539188}
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/resources/signin/dice_sync_confirmation/sync_confirmation_app.html
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/resources/signin/dice_sync_confirmation/sync_confirmation_app.js
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/resources/signin/dice_sync_confirmation/sync_confirmation_browser_proxy.js
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.html
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/resources/signin/sync_confirmation/sync_confirmation.js
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/signin/dice_browsertest.cc
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/webui/signin/sync_confirmation_handler.h
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/browser/ui/webui/signin/sync_confirmation_ui.h
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/test/data/webui/BUILD.gn
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/test/data/webui/signin/signin_browsertest.js
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/test/data/webui/signin/sync_confirmation_test.js
[add] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/chrome/test/data/webui/signin/test_sync_confirmation_browser_proxy.js
[modify] https://crrev.com/fa4a89496b423166220c562cee70bc9ff0490a54/components/consent_auditor/consent_auditor.h

Project Member

Comment 13 by bugdroid1@chromium.org, Feb 28 2018

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

commit 030b6cd047468305fc53cddf9a3536ddd4e9540e
Author: Martin Sramek <msramek@chromium.org>
Date: Wed Feb 28 12:45:12 2018

Record the signin/sync consent on Android.

Specifically, record the resource IDs of the strings the user saw
and clicked on when giving consent for Chrome Sync on Android.

See detailed explanation in this (internal) doc:
https://docs.google.com/document/d/1Psl9VJ4Dbc1Dh5bXCTa85OF1_DE3viTTHYwybu3V6Uk/edit#bookmark=id.6zygb41dn9vl

Bug: 781765
Change-Id: I55c04b7c206602d892dcfff34c47b79876000608
Reviewed-on: https://chromium-review.googlesource.com/880861
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539802}
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/android/BUILD.gn
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/android/java/res/layout/account_signin_view.xml
[add] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/android/java/src/org/chromium/chrome/browser/consent_auditor/ConsentAuditorBridge.java
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountSigninView.java
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/android/java_sources.gni
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/browser/BUILD.gn
[add] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/chrome/browser/android/consent_auditor/consent_auditor_bridge.cc
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/components/consent_auditor/BUILD.gn
[modify] https://crrev.com/030b6cd047468305fc53cddf9a3536ddd4e9540e/components/consent_auditor/consent_auditor.h

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 1 2018

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

commit 7ee58b34d56c333e5658f3cb42ec8e7b4dc38a8f
Author: Martin Sramek <msramek@chromium.org>
Date: Thu Mar 01 13:16:28 2018

Handle the Unicode NBSP character in SyncConfirmationUI

The SyncConfirmationUI class passes a set of strings to the
chrome://sync-confirmation WebUI. The strings relevant to consent
recording are then extracted from HTML and passed back to the C++ side,
to SyncConfirmationHandler.

At the same time, SyncConfirmationUI passes a copy of these strings
directly to SyncConfirmationHandler to verify that they weren't altered.

This assertion failed for string translations that contain the Unicode
NBSP symbol. This symbol was serialized into HTML as "&nbsp;", and so
the set of strings passed to SyncConfirmationHandler from
chrome://sync-confirmation no longer matched those passed directly.

Bug: 816862,781765
Change-Id: Icb3e2cb35326ba72e8aa340dc1d73a77d0ea2c59
Reviewed-on: https://chromium-review.googlesource.com/942321
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540142}
[modify] https://crrev.com/7ee58b34d56c333e5658f3cb42ec8e7b4dc38a8f/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 2 2018

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

commit 37d7f73c3877bc3cbe407180a6a7e5af78b82035
Author: Josh Horwich <jhorwich@google.com>
Date: Fri Mar 02 22:32:10 2018

Record ARC consents using consent_auditor

Record ARC-related consents using consent_auditor. This includes
Play ToS, Backup and Restore, and Location Services.

Adds checks to existing unit tests for proper consent recording, as
well as adding a unit test to cover a hybrid managed/unmanaged case.

Also fix a trivial bug in arc_terms_of_service.js referring to an
old name for a method in ArcTermsOfServiceScreen.

Bug: 781765
Test: Opt in on device, run unit_tests
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ibce048770f0479c2c87abd08dcfaf1fb19bf608c
Reviewed-on: https://chromium-review.googlesource.com/930473
Reviewed-by: Elijah Taylor <elijahtaylor@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540661}
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/arc_support_host.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/arc_support_host.h
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/arc_support_host_unittest.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/extensions/fake_arc_support.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/extensions/fake_arc_support.h
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/resources/chromeos/arc_support/background.js
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/resources/chromeos/arc_support/playstore.js
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/components/sync/protocol/proto_enum_conversions.cc
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/components/sync/protocol/user_event_specifics.proto
[modify] https://crrev.com/37d7f73c3877bc3cbe407180a6a7e5af78b82035/tools/metrics/histograms/enums.xml

Blockedon: 819204
Blockedon: 819218
Project Member

Comment 18 by bugdroid1@chromium.org, Mar 7 2018

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

commit c6513c600eabfb345d56296ea22128dba595cc78
Author: Martin Sramek <msramek@chromium.org>
Date: Wed Mar 07 14:19:38 2018

Initialize UserEventService early so that it's ready for ConsentAuditor

This is an interim solution until UserEventService is changed
to initialize synchronously when first instantiated. See the comment
in the added code for more details.

Bug: 781765, 819296
Change-Id: I860e7f1294b52a0f58f3281fcc8e76f4cdaf99d7
Reviewed-on: https://chromium-review.googlesource.com/951254
Reviewed-by: Markus Heintz <markusheintz@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541422}
[modify] https://crrev.com/c6513c600eabfb345d56296ea22128dba595cc78/chrome/browser/profiles/profile_manager.cc
[modify] https://crrev.com/c6513c600eabfb345d56296ea22128dba595cc78/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/c6513c600eabfb345d56296ea22128dba595cc78/components/consent_auditor/consent_auditor.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 7 2018

Labels: merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed9cd70727743cf1257dedb3673df27337b4c217

commit ed9cd70727743cf1257dedb3673df27337b4c217
Author: Josh Horwich <jhorwich@google.com>
Date: Wed Mar 07 22:29:18 2018

Record ARC consents using consent_auditor

Record ARC-related consents using consent_auditor. This includes
Play ToS, Backup and Restore, and Location Services.

Adds checks to existing unit tests for proper consent recording, as
well as adding a unit test to cover a hybrid managed/unmanaged case.

Also fix a trivial bug in arc_terms_of_service.js referring to an
old name for a method in ArcTermsOfServiceScreen.

Bug: 781765
Test: Opt in on device, run unit_tests
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ibce048770f0479c2c87abd08dcfaf1fb19bf608c
Reviewed-on: https://chromium-review.googlesource.com/930473
Reviewed-by: Elijah Taylor <elijahtaylor@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#540661}(cherry picked from commit 37d7f73c3877bc3cbe407180a6a7e5af78b82035)
Reviewed-on: https://chromium-review.googlesource.com/953822
Reviewed-by: Josh Horwich <jhorwich@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#77}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/arc_support_host.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/arc_support_host.h
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/arc_support_host_unittest.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/extensions/fake_arc_support.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/extensions/fake_arc_support.h
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/resources/chromeos/arc_support/background.js
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/resources/chromeos/arc_support/playstore.js
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/resources/chromeos/login/arc_terms_of_service.js
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/resources/chromeos/login/screen_arc_terms_of_service.js
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/components/sync/protocol/proto_enum_conversions.cc
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/components/sync/protocol/user_event_specifics.proto
[modify] https://crrev.com/ed9cd70727743cf1257dedb3673df27337b4c217/tools/metrics/histograms/enums.xml

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 28 2018

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

commit b946afdea90587afd06d59fda9ba9b3d4c132568
Author: Martin Sramek <msramek@chromium.org>
Date: Wed Mar 28 15:54:18 2018

Unify the instances of FakeConsentAuditor on Desktop and Chrome OS

There are three instances of FakeConsentAuditor on Desktop and Chrome OS
which are fairly similar - in fact, one of them is a superset of the
other two.

We extracted this one into a separate file, provided a factory method,
and used that in the remaining two sites.

There is one more instance of FakeConsentAuditor on iOS that is
not covered by this CL (as it requires a separate factory method). This
will be addressed in a follow-up CL.

Bug: 781765
Change-Id: Id193291b0b98a0b92cec8564dca65464db02caef
Reviewed-on: https://chromium-review.googlesource.com/982433
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546503}
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/BUILD.gn
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/chromeos/arc/arc_support_host_unittest.cc
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
[add] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/consent_auditor/consent_auditor_test_utils.cc
[add] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/consent_auditor/consent_auditor_test_utils.h
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/chrome/test/BUILD.gn
[modify] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/components/consent_auditor/BUILD.gn
[add] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/components/consent_auditor/fake_consent_auditor.cc
[add] https://crrev.com/b946afdea90587afd06d59fda9ba9b3d4c132568/components/consent_auditor/fake_consent_auditor.h

Project Member

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

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

commit 8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d
Author: Christian Dullweber <dullweber@chromium.org>
Date: Wed Apr 04 18:21:52 2018

Add queue for UserEventSyncBridge

Implement an in-memory queue for UserEventSyncBridge to keep user consent
events while the store or change processor are not ready yet. The queue
will be processed as soon as store and change processor are initialized.

Bug: 781765

Change-Id: I0a7fb25d66dce548c0f1ae9cf5f99e869ea54ddc
Reviewed-on: https://chromium-review.googlesource.com/980975
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548132}
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/chrome/browser/signin/dice_browsertest.cc
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/components/sync/user_events/user_event_sync_bridge.cc
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/components/sync/user_events/user_event_sync_bridge.h
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/components/sync/user_events/user_event_sync_bridge_unittest.cc
[modify] https://crrev.com/8d3a2e208e9c1fd49e6db664c1018e2fd625bc4d/tools/metrics/histograms/histograms.xml

Project Member

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

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

commit 55ebb205e796a8342f546c8e5a51fbbf2cece6cf
Author: vitaliii <vitaliii@chromium.org>
Date: Fri Apr 06 13:49:44 2018

[Sync] Preserve UserConsent when Sync is disabled.

Previously, all user events were deleted when Sync was disabled. After
this CL, user consent events are preserved in persistent store. This CL
does *not* include their garbage collection and attempting to send them again.


Bug: 781765
Change-Id: I6fdb7488da81324d782f28745299301b551a712c
Reviewed-on: https://chromium-review.googlesource.com/986514
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548767}
[modify] https://crrev.com/55ebb205e796a8342f546c8e5a51fbbf2cece6cf/components/sync/user_events/user_event_sync_bridge.cc
[modify] https://crrev.com/55ebb205e796a8342f546c8e5a51fbbf2cece6cf/components/sync/user_events/user_event_sync_bridge.h
[modify] https://crrev.com/55ebb205e796a8342f546c8e5a51fbbf2cece6cf/components/sync/user_events/user_event_sync_bridge_unittest.cc

Project Member

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

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

commit 220ea40bdbc3372b163be3863bc6076110473a88
Author: Martin Sramek <msramek@chromium.org>
Date: Fri Apr 06 18:20:57 2018

Add an account ID to the UserConsent proto.

This ID will be used to make sure that we don't mistakenly associate
the consent with an incorrect account if the user gives consent for an
account before finishing sign-in, or if the user signs out and signs in
to a different account before the proto can be transmitted.

Currently, the account ID is only an empty string. The field will be
populated once
https://chromium-review.googlesource.com/c/chromium/src/+/986293
lands. However, this CL can unblock the corresponding changes in
UserEventService that will consume this field.

Bug: 781765
Change-Id: I2dae998c599c2480771e54315627ee2be3bafe5d
Reviewed-on: https://chromium-review.googlesource.com/998195
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: vitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548862}
[modify] https://crrev.com/220ea40bdbc3372b163be3863bc6076110473a88/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/220ea40bdbc3372b163be3863bc6076110473a88/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/220ea40bdbc3372b163be3863bc6076110473a88/components/consent_auditor/consent_auditor_unittest.cc
[modify] https://crrev.com/220ea40bdbc3372b163be3863bc6076110473a88/components/sync/protocol/proto_visitors.h
[modify] https://crrev.com/220ea40bdbc3372b163be3863bc6076110473a88/components/sync/protocol/user_event_specifics.proto

Project Member

Comment 24 by bugdroid1@chromium.org, Apr 11 2018

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

commit 5efd970e444b7c9602b31763eeeee42abc460fce
Author: Martin Sramek <msramek@chromium.org>
Date: Wed Apr 11 13:39:01 2018

Pass the Account ID from consent UI surfaces to Consent Auditor

The Account ID of the account for which the user granted consent
is passed from:
- Desktop: SyncConfirmationHandler
- Android: ConsentTracker
- iOS: ChromeSigninViewController
- ChromeOS: ArcSupportHost, ArcTermsOfServiceScreenHandler

to ConsentAuditor. In this CL, we only verify that it's not empty.

A subsequent CL will pass it to UserEventService which will verify that
it's the same account that is currently signed in, to avoid sending
consents for account A over an authenticated channel of account B
(and associating the consent with B on the server).

Bug: 781765
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I5179b8932a3ec8fd865e97c2f8164ac2715ac840
Reviewed-on: https://chromium-review.googlesource.com/986293
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549870}
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/android/java/src/org/chromium/chrome/browser/consent_auditor/ConsentAuditorBridge.java
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/android/java/src/org/chromium/chrome/browser/signin/AccountSigninView.java
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/android/java/src/org/chromium/chrome/browser/signin/ConsentTextTracker.java
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/android/consent_auditor/consent_auditor_bridge.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/chromeos/arc/arc_support_host.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/chromeos/arc/arc_support_host_unittest.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/components/consent_auditor/consent_auditor.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/components/consent_auditor/consent_auditor.h
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/components/consent_auditor/consent_auditor_unittest.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/components/consent_auditor/fake_consent_auditor.cc
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/components/consent_auditor/fake_consent_auditor.h
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/ios/chrome/browser/ui/authentication/BUILD.gn
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/ios/chrome/browser/ui/authentication/chrome_signin_view_controller.mm
[modify] https://crrev.com/5efd970e444b7c9602b31763eeeee42abc460fce/ios/chrome/browser/ui/authentication/chrome_signin_view_controller_unittest.mm

Project Member

Comment 25 by bugdroid1@chromium.org, Apr 11 2018

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

commit 3382702ed327c50018a5c8d873587f7b510018d0
Author: vitaliii <vitaliii@chromium.org>
Date: Wed Apr 11 15:15:27 2018

[Sync] Resend previously persisted consents when sync is reenabled.

This is a followup to
https://chromium-review.googlesource.com/c/chromium/src/+/986514. After
that CL, UserEventSyncBridge does not delete user consent events when
sync is disabled, instead they are persisted in the store. In this CL,
these user consent event are resubmitted to sync when sync is reenabled
(based on OnSyncStarting call). This is done to avoid losing consents,
especially in DICE where sync may be disabled frequently. On the other
hand, it is allowed to record the same consent multiple times and this
is heavily utilized in this CL.

One could potentially come up with something simpler, however, later we
will have to avoid syncing events emitted from a different account.
Due to this requirement, the approach in this CL could not be simplified
further.

Bug: 781765
Change-Id: Ia1278d716b0ace05084f1de56f0647e149fd0e5e
Reviewed-on: https://chromium-review.googlesource.com/1004896
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549888}
[modify] https://crrev.com/3382702ed327c50018a5c8d873587f7b510018d0/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/3382702ed327c50018a5c8d873587f7b510018d0/components/sync/model/model_type_sync_bridge.h
[modify] https://crrev.com/3382702ed327c50018a5c8d873587f7b510018d0/components/sync/user_events/user_event_sync_bridge.cc
[modify] https://crrev.com/3382702ed327c50018a5c8d873587f7b510018d0/components/sync/user_events/user_event_sync_bridge.h
[modify] https://crrev.com/3382702ed327c50018a5c8d873587f7b510018d0/components/sync/user_events/user_event_sync_bridge_unittest.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Apr 12 2018

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

commit 5346d47ac4467f521fe543160e0ee8c974b5d132
Author: vitaliii <vitaliii@chromium.org>
Date: Thu Apr 12 17:20:46 2018

[Sync] Do not submit consents from a different account.

After crrev.com/c/1004896, all user consent events, which were persisted
when sync was disabled, are resubmited to sync when sync is enabled. In
this CL, the user consent events whose |account_id| differs from the
sync account are not resent to sync. Instead they are just left in the
persistent store waiting for the proper account to start syncing.

This CL does *not* include any garbage collection. This also does not
prevent recording consents for a different account via calling
RecordUserEvent when sync enabled. However, this should not happen.

Bug: 781765
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I91c7844b03fc4e2606c254c8aae6347faa364cdb
Reviewed-on: https://chromium-review.googlesource.com/1007063
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550250}
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/chrome/browser/sync/user_event_service_factory.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/DEPS
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_service_impl_unittest.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge.h
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge_unittest.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/ios/chrome/browser/sync/ios_user_event_service_factory.cc

Everything above is in M67, the BP was on revision 550428.
Project Member

Comment 28 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5346d47ac4467f521fe543160e0ee8c974b5d132

commit 5346d47ac4467f521fe543160e0ee8c974b5d132
Author: vitaliii <vitaliii@chromium.org>
Date: Thu Apr 12 17:20:46 2018

[Sync] Do not submit consents from a different account.

After crrev.com/c/1004896, all user consent events, which were persisted
when sync was disabled, are resubmited to sync when sync is enabled. In
this CL, the user consent events whose |account_id| differs from the
sync account are not resent to sync. Instead they are just left in the
persistent store waiting for the proper account to start syncing.

This CL does *not* include any garbage collection. This also does not
prevent recording consents for a different account via calling
RecordUserEvent when sync enabled. However, this should not happen.

Bug: 781765
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I91c7844b03fc4e2606c254c8aae6347faa364cdb
Reviewed-on: https://chromium-review.googlesource.com/1007063
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550250}
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/chrome/browser/sync/user_event_service_factory.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/DEPS
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_service_impl_unittest.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge.h
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/components/sync/user_events/user_event_sync_bridge_unittest.cc
[modify] https://crrev.com/5346d47ac4467f521fe543160e0ee8c974b5d132/ios/chrome/browser/sync/ios_user_event_service_factory.cc

Project Member

Comment 29 by bugdroid1@chromium.org, Jul 2

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

commit 8858c088023cae8b760cd2d459654685e386840a
Author: vitaliii <vitaliii@chromium.org>
Date: Mon Jul 02 10:41:55 2018

[Arc] Add a test for ToS hash calculation.


Bug: 781765,856583
Change-Id: Ia7feaf1119cc1f2f402646e66c832f656ca55e35
Reviewed-on: https://chromium-review.googlesource.com/1114612
Reviewed-by: Elijah Taylor <elijahtaylor@chromium.org>
Commit-Queue: vitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571859}
[modify] https://crrev.com/8858c088023cae8b760cd2d459654685e386840a/chrome/browser/chromeos/arc/arc_support_host_unittest.cc

Sign in to add a comment