Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Issue 12147004: Disable/enable echo for enterprise device. (Closed)

Created:
7 years, 10 months ago by oscarpan
Modified:
5 years, 1 month ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, Aaron Boodman, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, stephenlin, Mattias Nissler (ping if slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Disable/enable echo for enterprise device. Create a new policy to controll disable/enable Echo and make the policy value avaialbe to Echo extension. BUG=chromium-os:38500 TEST=unittest and manually check the flow is working. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181649

Patch Set 1 #

Patch Set 2 : Update inline comments. #

Total comments: 38

Patch Set 3 : Address Mattias and Xiyuan's comments, except one unit test Mattias required, which will be added i… #

Patch Set 4 : Add browser test. #

Patch Set 5 : Update some inline comments. #

Total comments: 12

Patch Set 6 : My efforts to implement the browser test for echo. #

Total comments: 17

Patch Set 7 : Address comments. #

Total comments: 6

Patch Set 8 : Address Mattias comments. #

Patch Set 9 : Rebase #

Total comments: 2

Patch Set 10 : Address Antony's comment. #

Patch Set 11 : Debugging. #

Patch Set 12 : fix test. #

Patch Set 13 : Add the missing SendResponse call to the async extension method. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -17 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/echo_private_api.h View 1 2 3 4 5 6 7 8 9 12 3 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/chromeos/extensions/echo_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +48 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/settings/cros_settings_names.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/cros_settings_names.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_provider.cc View 1 2 3 4 5 3 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_registry.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/device_policy_decoder_chromeos.cc View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/policy/proto/chrome_device_policy.proto View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/echo_private.json View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/echo/component_extension/test.js View 1 2 3 4 5 6 7 8 9 11 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
oscarpan
https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json#newcode3880 chrome/app/policy/policy_templates.json:3880: 'name': 'DeviceChromeOsRegistrationEnabled', The policy was named ***Disabled, but presubmit ...
7 years, 10 months ago (2013-02-02 01:50:55 UTC) #1
xiyuan
+mnissler https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json#newcode3880 chrome/app/policy/policy_templates.json:3880: 'name': 'DeviceChromeOsRegistrationEnabled', On 2013/02/02 01:50:56, oscarpan wrote: > ...
7 years, 10 months ago (2013-02-02 07:49:27 UTC) #2
oscarpan
https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json#newcode3880 chrome/app/policy/policy_templates.json:3880: 'name': 'DeviceChromeOsRegistrationEnabled', On 2013/02/02 07:49:27, xiyuan wrote: > On ...
7 years, 10 months ago (2013-02-02 21:52:35 UTC) #3
xiyuan
https://codereview.chromium.org/12147004/diff/3001/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/3001/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode116 chrome/browser/chromeos/extensions/echo_private_api.cc:116: chromeos::kChromeOsRegistrationEnabled, &isEnabled); On 2013/02/02 21:52:35, oscarpan wrote: > On ...
7 years, 10 months ago (2013-02-02 22:44:16 UTC) #4
Mattias Nissler (ping if slow)
Regarding the commit messages: It has typos, and the TEST= line isn't very helpful: "the ...
7 years, 10 months ago (2013-02-04 09:06:19 UTC) #5
Mattias Nissler (ping if slow)
The commit message has lots of typos, and the second half of the TEST= instructions ...
7 years, 10 months ago (2013-02-04 09:06:27 UTC) #6
Mattias Nissler (ping if slow)
On Mon, Feb 4, 2013 at 10:06 AM, <mnissler@chromium.org> wrote: > The commit message has ...
7 years, 10 months ago (2013-02-04 09:08:17 UTC) #7
oscarpan
https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/12147004/diff/3001/chrome/app/policy/policy_templates.json#newcode3883 chrome/app/policy/policy_templates.json:3883: 'supported_on': ['chrome.*:26-'], On 2013/02/04 09:06:19, Mattias Nissler wrote: > ...
7 years, 10 months ago (2013-02-05 00:17:47 UTC) #8
oscarpan
https://codereview.chromium.org/12147004/diff/25001/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/12147004/diff/25001/chrome/browser/policy/policy_browsertest.cc#newcode312 chrome/browser/policy/policy_browsertest.cc:312: } Apparently my test failed. It complained "Cannot call ...
7 years, 10 months ago (2013-02-05 05:39:21 UTC) #9
Mattias Nissler (ping if slow)
https://codereview.chromium.org/12147004/diff/3001/chrome/browser/chromeos/settings/device_settings_provider.cc File chrome/browser/chromeos/settings/device_settings_provider.cc (right): https://codereview.chromium.org/12147004/diff/3001/chrome/browser/chromeos/settings/device_settings_provider.cc#newcode565 chrome/browser/chromeos/settings/device_settings_provider.cc:565: DecodeGenericPolicies(settings, &new_values_cache); On 2013/02/05 00:17:47, oscarpan wrote: > On ...
7 years, 10 months ago (2013-02-05 13:06:53 UTC) #10
oscarpan
https://codereview.chromium.org/12147004/diff/25001/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/25001/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode38 chrome/browser/chromeos/extensions/echo_private_api.cc:38: if (!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { On 2013/02/05 13:06:53, Mattias Nissler wrote: ...
7 years, 10 months ago (2013-02-06 04:34:54 UTC) #11
oscarpan
https://codereview.chromium.org/12147004/diff/29001/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/12147004/diff/29001/chrome/browser/policy/policy_browsertest.cc#newcode106 chrome/browser/policy/policy_browsertest.cc:106: #include "chrome/browser/extensions/component_loader.h" Either remove or reorder the imports in ...
7 years, 10 months ago (2013-02-06 04:38:45 UTC) #12
xiyuan
https://codereview.chromium.org/12147004/diff/29001/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/29001/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode115 chrome/browser/chromeos/extensions/echo_private_api.cc:115: return; Let's add a AddRef() before return here to ...
7 years, 10 months ago (2013-02-06 05:28:11 UTC) #13
Mattias Nissler (ping if slow)
https://codereview.chromium.org/12147004/diff/25001/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/25001/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode38 chrome/browser/chromeos/extensions/echo_private_api.cc:38: if (!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { On 2013/02/06 04:34:54, oscarpan wrote: > ...
7 years, 10 months ago (2013-02-06 10:03:26 UTC) #14
Mattias Nissler (ping if slow)
https://codereview.chromium.org/12147004/diff/29001/chrome/browser/policy/device_policy_decoder_chromeos.cc File chrome/browser/policy/device_policy_decoder_chromeos.cc (right): https://codereview.chromium.org/12147004/diff/29001/chrome/browser/policy/device_policy_decoder_chromeos.cc#newcode420 chrome/browser/policy/device_policy_decoder_chromeos.cc:420: if (container.allow_redeem_offers()) { This is the reason why you ...
7 years, 10 months ago (2013-02-06 10:25:22 UTC) #15
oscarpan
https://codereview.chromium.org/12147004/diff/29001/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/29001/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode111 chrome/browser/chromeos/extensions/echo_private_api.cc:111: if (chromeos::CrosSettingsProvider::TRUSTED != I think we should only disable ...
7 years, 10 months ago (2013-02-07 00:26:12 UTC) #16
oscarpan
https://codereview.chromium.org/12147004/diff/32002/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/12147004/diff/32002/chrome/browser/policy/policy_browsertest.cc#newcode1367 chrome/browser/policy/policy_browsertest.cc:1367: UpdateProviderPolicy(policies); So I confirmed that all other codes are ...
7 years, 10 months ago (2013-02-07 00:40:39 UTC) #17
Mattias Nissler (ping if slow)
I didn't find an answer to my comment regarding checking the policy also in GetRegistrationCode(), ...
7 years, 10 months ago (2013-02-07 10:45:56 UTC) #18
oscarpan
https://codereview.chromium.org/12147004/diff/32002/chrome/browser/chromeos/extensions/echo_private_api.cc File chrome/browser/chromeos/extensions/echo_private_api.cc (right): https://codereview.chromium.org/12147004/diff/32002/chrome/browser/chromeos/extensions/echo_private_api.cc#newcode38 chrome/browser/chromeos/extensions/echo_private_api.cc:38: // TODO(oscarpan) update to use PrepareTrustedValues. On 2013/02/07 10:45:57, ...
7 years, 10 months ago (2013-02-07 13:10:56 UTC) #19
Mattias Nissler (ping if slow)
LGTM
7 years, 10 months ago (2013-02-07 13:13:08 UTC) #20
xiyuan
lgtm
7 years, 10 months ago (2013-02-07 15:35:20 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oscarpan@google.com/12147004/29018
7 years, 10 months ago (2013-02-08 23:02:25 UTC) #22
commit-bot: I haz the power
Presubmit check for 12147004-29018 failed and returned exit status 1. INFO:root:Found 13 file(s). Running presubmit ...
7 years, 10 months ago (2013-02-08 23:02:31 UTC) #23
asargent_no_longer_on_chrome
chrome/{browser,common}/extensions LGTM https://chromiumcodereview.appspot.com/12147004/diff/29018/chrome/common/extensions/api/echo_private.json File chrome/common/extensions/api/echo_private.json (right): https://chromiumcodereview.appspot.com/12147004/diff/29018/chrome/common/extensions/api/echo_private.json#newcode54 chrome/common/extensions/api/echo_private.json:54: "name": "allowRedeemOffers", optional naming suggestion: it looks ...
7 years, 10 months ago (2013-02-09 00:19:33 UTC) #24
oscarpan
https://chromiumcodereview.appspot.com/12147004/diff/29018/chrome/common/extensions/api/echo_private.json File chrome/common/extensions/api/echo_private.json (right): https://chromiumcodereview.appspot.com/12147004/diff/29018/chrome/common/extensions/api/echo_private.json#newcode54 chrome/common/extensions/api/echo_private.json:54: "name": "allowRedeemOffers", Maybe checkAllowRedeemOffers? On 2013/02/09 00:19:33, Antony Sargent ...
7 years, 10 months ago (2013-02-09 00:30:11 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oscarpan@google.com/12147004/19006
7 years, 10 months ago (2013-02-09 21:02:20 UTC) #26
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=82873
7 years, 10 months ago (2013-02-09 23:46:10 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oscarpan@google.com/12147004/32009
7 years, 10 months ago (2013-02-10 12:40:47 UTC) #28
commit-bot: I haz the power
7 years, 10 months ago (2013-02-10 14:49:16 UTC) #29
Message was sent while issue was closed.
Change committed as 181649

Powered by Google App Engine
This is Rietveld 408576698