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

Issue 633258 link

Starred by 6 users

Issue metadata

Status: Archived
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ARC: Enabling/disabling Android apps multiple times is racy

Project Member Reported by lhchavez@chromium.org, Aug 1 2016

Issue description

If the user disables Android apps, the user data is wiped. While in this state, re-enabling Android is racy until after the data is done being wiped, and might either cause timeouts or enter invalid states.

We need to make sure Android cannot be enabled until after session_manager has finished wiping user data.
 
Cc: dspaid@chromium.org
Dan, is there an existing bug ?
Owner: hidehiko@chromium.org
Status: Assigned (was: Untriaged)
looking...
There's a bug (627664) for one specific race condition where where opting-in too quickly causes user data to never be removed, but I don't know of any others.

Last time I looked in to this I got the impression that the race condition as described here doesn't actually happen.  If I understand correctly the threading prevents the user from opting in before RemoveArcData is called, and the threading of session_manager_impl prevents new containers from being created before it finishes.
That being said its all too indirect for comfort and stronger guarantees would be awesome.
Cc: yoshiat@chromium.org
Status: Started (was: Assigned)
The issue here is that if the user opts out and in again too quickly, and the wiping operation takes longer than the D-Bus timeout (which we have seen is very likely in the wild), starting ARC will fail from Chrome's perspective, so it would not retry. I don't know if the container itself would be started later or not, which also seems dangerous.

There was some logic added to the code that does data wiping to wait before restarting, but it needs to be moved one layer below since there are other ways in which ARC can be started.
Another bug is that if toggling is done more quickly, then enabling event happens before the ARC stopping (practically this is doable easily).
In such cases, UI shows underterministic error messages and sometimes flickering because of its internal state management.

ArcAuthService needs to manage more precise states of ABS as well as, as Luis said at #6, data wipe out states.
Looking at the code, let me propose alternative approach, which is;

Merging ArcUserDataService into ArcAuthService.

Conceptually, we have mutually exclusive two tasks.
- ARC instance management.
- User data removal procedure.

If either runs, the other should not run.
Merging user data removal into ABS is still possible approach, I think.
Though, considering current code, merging it to ArcAuthService looks smaller work.
Actually, in some cases, ArcAuthService also removes the user data (independently from ArcUserDataService, which is broken code path now...). So 
we'll be able to reusing it. Although it is not complete fix, but this can reduce the much risk of mysterious state/buggy behaviors, IMHO.

Though, AAS is now complicated class, because of organic growth based on various requirements.
So, after some important bug fix, I'll clean ArcAuthService up, which needs relatively huge code change. I will send another refactoring proposal similar to what I did for ABS later. It should also be the fixes of edge cases.

Comment 9 by khmel@chromium.org, Aug 3 2016

Thanks Hidehiko for your proposal. It looks like not very fast solution. Do we still want it into M53 (consider it is marked as P3)?
For the first part (merging to ArcAuthService) should small. (Will make a CL).
Though latter part is huge. Thus, I think first part is the cherry-pick target, and the latter is not.

As for priority, I personally think, data removal race is critical (because it is user data breakage), though others look less important since retry later should work well. Luis, any thoughts?

WDYT?
Project Member

Comment 11 by sheriffbot@chromium.org, Aug 5 2016

Labels: -M-53 M-54 MovedFrom-53
Moving this nonessential bug to the next milestone.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 12 by bugdroid1@chromium.org, Aug 14 2016

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

commit 6d95ad318e992261c45f5a88a0a599663a6d66ae
Author: hidehiko <hidehiko@chromium.org>
Date: Sun Aug 14 18:47:17 2016

Migrate ArcUserDataService into ArcAuthService.

There are race problems around data removing.
One of the cause is that state management is done in
ArcAuthService and ArcUserDataService separately.

This CL migrates ArcUserDataService into ArcAuthService
so that we can remove the data when necessary.

BUG= 633258 
TEST=Ran manually.
     - "Enable -> ARC boot wait -> Disable" triggers data removal after
       ARC stop.
     - "Enable -> Disable before ARC boot" triggers immediate data
       removal.
     - "Enable -> ARC boot wait -> Kill ARC instance" does not trigger
       data removal.

Review-Url: https://codereview.chromium.org/2209173002
Cr-Commit-Position: refs/heads/master@{#411923}

[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/chromeos/arc/arc_auth_service.cc
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/chromeos/arc/arc_auth_service.h
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/chromeos/arc/arc_auth_service_unittest.cc
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/ui/app_list/arc/arc_app_test.cc
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/chrome/browser/ui/app_list/arc/arc_app_test.h
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/components/arc/arc_service_manager.cc
[modify] https://crrev.com/6d95ad318e992261c45f5a88a0a599663a6d66ae/components/arc/arc_service_manager.h

Project Member

Comment 13 by bugdroid1@chromium.org, Aug 18 2016

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

commit d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Thu Aug 18 04:20:51 2016

Migrate ArcUserDataService into ArcAuthService.

There are race problems around data removing.
One of the cause is that state management is done in
ArcAuthService and ArcUserDataService separately.

This CL migrates ArcUserDataService into ArcAuthService
so that we can remove the data when necessary.

BUG= 633258 , 636218
TEST=Ran manually.
     - "Enable -> ARC boot wait -> Disable" triggers data removal after
       ARC stop.
     - "Enable -> Disable before ARC boot" triggers immediate data
       removal.
     - "Enable -> ARC boot wait -> Kill ARC instance" does not trigger
       data removal.
R=dspaid@chromium.org, lhchavez@chromium.org
TBR=khmel@chromium.org, lhchavez@chromium.org, stevenjb@chromium.org

Review-Url: https://codereview.chromium.org/2209173002
Cr-Commit-Position: refs/heads/master@{#411923}
(cherry picked from commit 6d95ad318e992261c45f5a88a0a599663a6d66ae)

Review URL: https://codereview.chromium.org/2248353002 .

Cr-Commit-Position: refs/branch-heads/2785@{#654}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/chromeos/arc/arc_auth_service.cc
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/chromeos/arc/arc_auth_service.h
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/chromeos/arc/arc_auth_service_unittest.cc
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/ui/app_list/arc/arc_app_test.cc
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/chrome/browser/ui/app_list/arc/arc_app_test.h
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/components/arc/arc_service_manager.cc
[modify] https://crrev.com/d7ca35a59c7bd8c7ddd78d7682458e48e6b4e934/components/arc/arc_service_manager.h

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 25 2016

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

commit 61bc6c8dc688551cc51ef7c32515816d4f031bc0
Author: hidehiko <hidehiko@chromium.org>
Date: Thu Aug 25 02:05:22 2016

Migrate ArcUserDataService into ArcAuthService.

There are race problems around data removing.
One of the cause is that state management is done in
ArcAuthService and ArcUserDataService separately.

This CL migrates ArcUserDataService into ArcAuthService
so that we can remove the data when necessary.

BUG= 633258 , 636218
TEST=Ran manually.
     - "Enable -> ARC boot wait -> Disable" triggers data removal after
       ARC stop.
     - "Enable -> Disable before ARC boot" triggers immediate data
       removal.
     - "Enable -> ARC boot wait -> Kill ARC instance" does not trigger
       data removal.
NOTRY=true
NOPRESUBMIT=true
TBR=dspaid@chromium.org, lhchavez@chromium.org, stevenjb@chromium.org

Review-Url: https://codereview.chromium.org/2209173002
Cr-Commit-Position: refs/heads/master@{#411923}
(cherry picked from commit 6d95ad318e992261c45f5a88a0a599663a6d66ae)

Review-Url: https://codereview.chromium.org/2261653002
Cr-Commit-Position: refs/branch-heads/2785@{#746}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/chromeos/arc/arc_auth_service.cc
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/chromeos/arc/arc_auth_service.h
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/chromeos/arc/arc_auth_service_unittest.cc
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.cc
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/chromeos/arc/arc_enterprise_reporting_service.h
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/ui/app_list/arc/arc_app_test.cc
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/chrome/browser/ui/app_list/arc/arc_app_test.h
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/components/arc/arc_service_manager.cc
[modify] https://crrev.com/61bc6c8dc688551cc51ef7c32515816d4f031bc0/components/arc/arc_service_manager.h

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 30 2016

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

commit 321d423c67a0fb6ae104d1275a15498dc96cd0e9
Author: hidehiko <hidehiko@chromium.org>
Date: Fri Sep 30 15:51:30 2016

Fix ArcBridgeBootstrap race issues.

This CL restructs the state management in ArcBridgeBootstrap.
The biggest change is; ArcBridgeBootstrap now handles one
life-cycle of ARC instance. To restart, the instance
needs to be recreated.

With the change, the internal state management is also changed.
Detailed behavior is defined and commented in ArcBridgeBootstrapImpl's
comment. This change identifies the problematic behaviors/race behaviors
in the original code, and fixes them. Mainly three changes here;
- Internal state and "if Stop() is called" are managed separately.
- Mojo connection establishment on WorkerPool thread is now cancellable.
- ArcBridgeBootstrap instance is created per ARC instance, so that stale callbacks would not be called.

With the change, FakeArcBridgeBootstrap needs to be updated, too.

BUG= 633258 
BUG=b/30236819
TEST=Ran ARC on test device. Trybots.

Review-Url: https://codereview.chromium.org/2194193002
Cr-Commit-Position: refs/heads/master@{#422124}

[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_bootstrap.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_bootstrap.h
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_service.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_service.h
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_service_impl.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_service_impl.h
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_bridge_service_unittest.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/arc_service_manager.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/test/fake_arc_bridge_bootstrap.cc
[modify] https://crrev.com/321d423c67a0fb6ae104d1275a15498dc96cd0e9/components/arc/test/fake_arc_bridge_bootstrap.h

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 5 2016

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

commit a028d09fb9831cf4a036791431e771ab7d6bfdaa
Author: hidehiko <hidehiko@chromium.org>
Date: Wed Oct 05 02:20:23 2016

Switch from Delegate to Observer.

This CL switches the interface between ArcBridgeBootstrap
and ArcBridgeServiceImpl from Delegate to Observer.
Also, ArcBridgeHost will be instantiated in ArcBridgeBootstrap
and kept in it.

BUG= 633258 
TEST=Trybots.

Review-Url: https://codereview.chromium.org/2379223004
Cr-Commit-Position: refs/heads/master@{#423051}

[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/BUILD.gn
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/arc_bridge_bootstrap.cc
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/arc_bridge_bootstrap.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/arc_bridge_service_impl.cc
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/arc_bridge_service_impl.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/arc_bridge_service_unittest.cc
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/test/fake_arc_bridge_bootstrap.cc
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/test/fake_arc_bridge_bootstrap.h
[delete] https://crrev.com/ebaaed67656c010067bd52ace76c1391302eaa05/components/arc/test/fake_arc_bridge_instance.cc
[delete] https://crrev.com/ebaaed67656c010067bd52ace76c1391302eaa05/components/arc/test/fake_arc_bridge_instance.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/test/fake_intent_helper_instance.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/test/fake_notifications_instance.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/components/arc/test/fake_policy_instance.h
[modify] https://crrev.com/a028d09fb9831cf4a036791431e771ab7d6bfdaa/ui/arc/notification/arc_notification_manager_unittest.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 6 2016

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

commit 778baa7c83b7c45eee055f53ac445cdeba5cfbdd
Author: hidehiko <hidehiko@chromium.org>
Date: Thu Oct 06 05:09:15 2016

Fix compile error on simple chrome.

Under C++11, NVRO can happen when a return's expression
has the function's return type.
Here, those are different (although FakeArcBridgeBootstrap
inherits ArcBridgeBootstrap), thus explicit std::move()
should be here.

Note, C++17 or later, the condition is relaxed and NVRO
becomes mandatory, so the old code should work, though.

cf): C++11 n3337/12.8/32, C++17 n4594/12.8/32

BUG= 633258 
TEST=Ran bots. Build component_unittests under simple chrome env.

Review-Url: https://codereview.chromium.org/2394883004
Cr-Commit-Position: refs/heads/master@{#423436}

[modify] https://crrev.com/778baa7c83b7c45eee055f53ac445cdeba5cfbdd/components/arc/arc_bridge_service_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55

commit de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Wed Oct 05 23:30:13 2016

login: Add free-disk-size check on StartArcInstance().

This CL is the session_manager side change for moving
free disk size check from Chrome.
The corresponding check is
https://cs.chromium.org/chromium/src/components/arc/arc_bridge_bootstrap.cc?q=arc_bridge_bootstrap.cc&sq=package:chromium&dr&l=313

BUG= chromium:628124 ,  chromium:633258 , b:30498714
TEST=Ran on test device. Ran unittests.

Change-Id: I4c1ca01101efdc30081afc94312399124fa8e358
Reviewed-on: https://chromium-review.googlesource.com/393628
Commit-Ready: Hidehiko Abe <hidehiko@chromium.org>
Tested-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>

[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/dbus_error_types.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/mock_system_utils.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/session_manager_impl.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/session_manager_impl_unittest.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils_impl.cc
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils_impl.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/dbus_error_types.h
[modify] https://crrev.com/de2073cc7c44480d70bd2c2ba9c0a0f87e24ed55/login_manager/system_utils.h

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 7 2016

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

commit 14f70fe81402b55617e7f92839368b14c42eaf1f
Author: hidehiko <hidehiko@chromium.org>
Date: Fri Oct 07 16:13:54 2016

Move free disk space check to session_manager.

Now session_manager returns an error if the free disk
space is low. Thus, this removes the current disk space
checking in arc_bridge_bootstrap, instead, looking at
the error code on StartArcInstance failure.

BUG= 628124 ,  633258 , b/30498714
TEST=Ran on test device. Ran trybots.

Review-Url: https://codereview.chromium.org/2397863003
Cr-Commit-Position: refs/heads/master@{#423873}

[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chrome/browser/chromeos/settings/device_settings_test_helper.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chrome/browser/chromeos/settings/device_settings_test_helper.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/fake_session_manager_client.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/fake_session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/mock_session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/session_manager_client.cc
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/chromeos/dbus/session_manager_client.h
[modify] https://crrev.com/14f70fe81402b55617e7f92839368b14c42eaf1f/components/arc/arc_bridge_bootstrap.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 18 2016

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

commit 04ad939f0adbbacd67d8631f38e488221b26cc4b
Author: hidehiko <hidehiko@chromium.org>
Date: Tue Oct 18 03:21:37 2016

Re-sort preference update protocol between Chrome and ArcSupport.

Currently, the preference connected checkbox is individually
implemented so that there are many "copy-and-paste then
customize" code. This CL re-sorts the structure so that
the protocol from the Chrome to the extension is a pair of
(enabled, managed). Also, it reduces the dupped code.

Along with the change, the UI update code in the
ArcSupportHost is moved to the extension, too.

This is the preparation to split the params in onAgree()
callback into indivisual checkbox click.
Once it's done, then the dependency between ArcSupportHost
and ArcAuthService will be reverted.

TEST=Ran on test device. Ran bots.
BUG= 633258 , b/31079732
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2408063007
Cr-Commit-Position: refs/heads/master@{#425883}

[modify] https://crrev.com/04ad939f0adbbacd67d8631f38e488221b26cc4b/chrome/browser/chromeos/arc/arc_support_host.cc
[modify] https://crrev.com/04ad939f0adbbacd67d8631f38e488221b26cc4b/chrome/browser/chromeos/arc/arc_support_host.h
[modify] https://crrev.com/04ad939f0adbbacd67d8631f38e488221b26cc4b/chrome/browser/resources/chromeos/arc_support/background.js
[modify] https://crrev.com/04ad939f0adbbacd67d8631f38e488221b26cc4b/chrome/browser/resources/chromeos/arc_support/main.html

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 18 2016

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

commit 88160c8517ad770b6a56f773b2174448c443cc11
Author: hidehiko <hidehiko@chromium.org>
Date: Tue Oct 18 09:43:47 2016

Rename ArcBridgeBootstrap to ArcSession.

Now, ArcBridgeBootstrap was not only handles bootstrap-phase
procedure, but also, e.g., crash handling or shutdown.
So, the name did not represent what it was.

This CL renames it to ArcSession.

BUG= 633258 , b/30236819
TEST=Ran on test device. Ran trybots.

Review-Url: https://codereview.chromium.org/2425753002
Cr-Commit-Position: refs/heads/master@{#425933}

[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/BUILD.gn
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_bridge_service.h
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_bridge_service_impl.cc
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_bridge_service_impl.h
[modify] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_bridge_service_unittest.cc
[rename] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_session.cc
[rename] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/arc_session.h
[rename] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/test/fake_arc_session.cc
[rename] https://crrev.com/88160c8517ad770b6a56f773b2174448c443cc11/components/arc/test/fake_arc_session.h

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 21 2016

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

commit 1362287708e9a559efbe66b4a137150c6aef7348
Author: hidehiko <hidehiko@chromium.org>
Date: Fri Oct 21 10:05:09 2016

More graceful shutdown for ArcSession.

Currently, ArcSession uses the same function for stop request
by user's action, and Chrome's process shutdown.
However, those runs under different conditions. Specifically
on Chrome's process shutdown, there is no more running UI
message loop, so async callback on UI thread will not work later.

For more graceful shutdown, this CL introduces a dedicated
method for shutdown.

BUG= 633258 
BUG=b/30236819
TEST=Ran bots. Ran on the test device and made sure the shutdown works.

Review-Url: https://chromiumcodereview.appspot.com/2436763004
Cr-Commit-Position: refs/heads/master@{#426760}

[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/chrome/browser/chromeos/arc/arc_auth_service.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/chrome/browser/chromeos/arc/arc_service_launcher.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_bridge_service.h
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_bridge_service_impl.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_bridge_service_impl.h
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_bridge_service_unittest.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_service_manager.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_session.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/arc_session.h
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/test/fake_arc_bridge_service.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/test/fake_arc_bridge_service.h
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/test/fake_arc_session.cc
[modify] https://crrev.com/1362287708e9a559efbe66b4a137150c6aef7348/components/arc/test/fake_arc_session.h

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 25 2016

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

commit e0eb7942096fb4945f5d5d3ed23632148d5348bd
Author: hidehiko <hidehiko@chromium.org>
Date: Tue Oct 25 04:56:29 2016

Extract ArcSupportMessageHost.

Currently ArcSupportHost is the ARC's implementation of
NativeMessageHost. Because of the system structure, the instance
is created and managed by the module outside of ARC.

This CL extracts the implementation of that part into
ArcSupportMessageHost so that the ArcSupportHost, which will
be the main interface to show UI things for ARC, can be managed
along with the ARC's life-time.

There is a plan to extract non authorization related part from
ArcAuthSerivce. Meanwhile, the instance is managed by
ArcAuthService, temporarily.

BUG=657687, 636218,  633258 , b/31079732
TEST=Ran on test device. Ran trybots.

Review-Url: https://codereview.chromium.org/2436903003
Cr-Commit-Position: refs/heads/master@{#427277}

[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/arc_auth_service.cc
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/arc_auth_service.h
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/arc_auth_service_unittest.cc
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/arc_support_host.cc
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/arc_support_host.h
[add] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/extensions/arc_support_message_host.cc
[add] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/chromeos/arc/extensions/arc_support_message_host.h
[modify] https://crrev.com/e0eb7942096fb4945f5d5d3ed23632148d5348bd/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 27 2016

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

commit 778baa7c83b7c45eee055f53ac445cdeba5cfbdd
Author: hidehiko <hidehiko@chromium.org>
Date: Thu Oct 06 05:09:15 2016

Fix compile error on simple chrome.

Under C++11, NVRO can happen when a return's expression
has the function's return type.
Here, those are different (although FakeArcBridgeBootstrap
inherits ArcBridgeBootstrap), thus explicit std::move()
should be here.

Note, C++17 or later, the condition is relaxed and NVRO
becomes mandatory, so the old code should work, though.

cf): C++11 n3337/12.8/32, C++17 n4594/12.8/32

BUG= 633258 
TEST=Ran bots. Build component_unittests under simple chrome env.

Review-Url: https://codereview.chromium.org/2394883004
Cr-Commit-Position: refs/heads/master@{#423436}

[modify] https://crrev.com/778baa7c83b7c45eee055f53ac445cdeba5cfbdd/components/arc/arc_bridge_service_unittest.cc

Comment 25 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Project Member

Comment 26 by bugdroid1@chromium.org, Mar 1 2017

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

commit ae82e3ad7862628f263303d750ee7e1ac5775219
Author: hidehiko <hidehiko@chromium.org>
Date: Wed Mar 01 20:05:39 2017

Do nothing on OnSessionStopped if ARC is being restarted.

ArcSessionManager::OnSessionStopped() implements operations
running on ARC session is stopped.
However, ArcSessionRunner supports automatic restarting,
and the function does not expect such cases, so that state
machine gets into a wrong state.

Along with the behavior change, unifies the observers
for ArcSessionManager.

BUG=657687
BUG=636218
BUG= 633258 
TEST=Ran bots.

Review-Url: https://codereview.chromium.org/2720303002
Cr-Commit-Position: refs/heads/master@{#454007}

[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/chrome/browser/chromeos/arc/arc_session_manager.cc
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/chrome/browser/chromeos/arc/arc_session_manager.h
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.h
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/BUILD.gn
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_session.cc
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_session.h
[delete] https://crrev.com/b2d4d4ba555e4658e5b2ea2ba4cbd9b95ac84442/components/arc/arc_session_observer.cc
[delete] https://crrev.com/b2d4d4ba555e4658e5b2ea2ba4cbd9b95ac84442/components/arc/arc_session_observer.h
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_session_runner.cc
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_session_runner.h
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_session_runner_unittest.cc
[add] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_stop_reason.cc
[add] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/arc_stop_reason.h
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/test/fake_arc_session.cc
[modify] https://crrev.com/ae82e3ad7862628f263303d750ee7e1ac5775219/components/arc/test/fake_arc_session.h

Project Member

Comment 27 by bugdroid1@chromium.org, Jun 30 2017

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

commit c06f801f1d1d68122d17e300c5565fc9e8eda94c
Author: Hidehiko Abe <hidehiko@chromium.org>
Date: Fri Jun 30 18:14:18 2017

Fix race issue in ARC start up.

If we quickly stop and start ARC, it ARC support reports an error,
until the container stops. Then, even during the data removal,
it will start to show the ToS negotiation page and followings.

This CL fixes the case, by introducing STOPPING state.

BUG=657687,  633258 
TEST=Ran manually. Added some delay on stopping container, and made sure
     this works. Ran bots. Ran unit_tests and browser_tests locally.

Change-Id: Iafcd7b4bbc70a4148c08054b8e48b81c9ab226ce
Reviewed-on: https://chromium-review.googlesource.com/556619
Reviewed-by: Luis Hector Chavez <lhchavez@chromium.org>
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483758}
[modify] https://crrev.com/c06f801f1d1d68122d17e300c5565fc9e8eda94c/chrome/browser/chromeos/arc/arc_session_manager.cc
[modify] https://crrev.com/c06f801f1d1d68122d17e300c5565fc9e8eda94c/chrome/browser/chromeos/arc/arc_session_manager.h
[modify] https://crrev.com/c06f801f1d1d68122d17e300c5565fc9e8eda94c/chrome/browser/chromeos/arc/arc_session_manager_unittest.cc
[modify] https://crrev.com/c06f801f1d1d68122d17e300c5565fc9e8eda94c/chrome/browser/chromeos/arc/notification/arc_provision_notification_service_unittest.cc

Status: Fixed (was: Started)
Fixed finally.

Comment 29 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment