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

Issue 10977048: Fix bug in disabling sync for default apps (Closed)

Created:
8 years, 2 months ago by Gaurav
Modified:
8 years, 2 months ago
Reviewers:
ncarter (slow)
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Fix bug in disabling sync for default apps We added a new creation_flag for default apps was_installed_by_default, but every time we add a new creation_flag, we need to update the installedLoader as it does not directly pick the creation_flags but re-creates them through other preferences. To fix this, I added a new preference to save creation_flags in preference, and read that directly. BUG=152582 TBR=nick@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=160259

Patch Set 1 #

Patch Set 2 : Added a preference for creation_flags, Also added creation_flags check in ReloadExtensions unittest #

Total comments: 11

Patch Set 3 : Addresed comments and fixed bugs. Removed not required from_webstore arguement #

Total comments: 2

Patch Set 4 : Added test for the creation flag installed by default #

Patch Set 5 : Rebase #

Patch Set 6 : Fix browser and integration tests, which got broken #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -38 lines) Patch
M chrome/browser/extensions/app_process_apitest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_browsertest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 4 chunks +22 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_sorting_unittest.cc View 1 2 8 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/extensions/installed_loader.cc View 1 2 3 4 1 chunk +1 line, -8 lines 0 comments Download
M chrome/browser/extensions/test_extension_prefs.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/unpacked_installer.cc View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/media_gallery/media_galleries_preferences_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/sync_extension_helper.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/panels/base_panel_browser_test.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
Gaurav
8 years, 2 months ago (2012-09-27 00:56:16 UTC) #1
Mihai Parparita -not on Chrome
Can you make the CL description more descriptive (e.g. say that we weren't actually setting ...
8 years, 2 months ago (2012-09-27 18:02:06 UTC) #2
Gaurav
We added a new creation_flag for default apps was_installed_by_default, but every time we add a ...
8 years, 2 months ago (2012-09-29 00:05:56 UTC) #3
Mihai Parparita -not on Chrome
I appreciate the attempt at fixing the underlying problem, by making the preservation of creation ...
8 years, 2 months ago (2012-09-29 00:22:25 UTC) #4
Mihai Parparita -not on Chrome
On Fri, Sep 28, 2012 at 5:05 PM, <grv@chromium.org> wrote: > We added a new ...
8 years, 2 months ago (2012-09-29 00:23:06 UTC) #5
Gaurav
Thanks Mihai Will fix the issues and update. https://codereview.chromium.org/10977048/diff/4001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): https://codereview.chromium.org/10977048/diff/4001/chrome/browser/extensions/extension_prefs.cc#newcode1881 chrome/browser/extensions/extension_prefs.cc:1881: creation_flags ...
8 years, 2 months ago (2012-09-29 00:30:28 UTC) #6
Gaurav
https://codereview.chromium.org/10977048/diff/4001/chrome/browser/extensions/extension_prefs.cc File chrome/browser/extensions/extension_prefs.cc (right): https://codereview.chromium.org/10977048/diff/4001/chrome/browser/extensions/extension_prefs.cc#newcode1448 chrome/browser/extensions/extension_prefs.cc:1448: bool from_webstore, On 2012/09/29 00:22:25, Mihai Parparita wrote: > ...
8 years, 2 months ago (2012-10-01 22:09:36 UTC) #7
Mihai Parparita -not on Chrome
LGTM https://codereview.chromium.org/10977048/diff/11002/chrome/browser/extensions/extension_service_unittest.cc File chrome/browser/extensions/extension_service_unittest.cc (right): https://codereview.chromium.org/10977048/diff/11002/chrome/browser/extensions/extension_service_unittest.cc#newcode3411 chrome/browser/extensions/extension_service_unittest.cc:3411: EXPECT_FALSE(extension->was_installed_by_default()); Add a test that the was_installed_by_default flag ...
8 years, 2 months ago (2012-10-02 17:00:54 UTC) #8
Gaurav
Thanks Mihai https://codereview.chromium.org/10977048/diff/11002/chrome/browser/extensions/extension_service_unittest.cc File chrome/browser/extensions/extension_service_unittest.cc (right): https://codereview.chromium.org/10977048/diff/11002/chrome/browser/extensions/extension_service_unittest.cc#newcode3411 chrome/browser/extensions/extension_service_unittest.cc:3411: EXPECT_FALSE(extension->was_installed_by_default()); On 2012/10/02 17:00:54, Mihai Parparita wrote: ...
8 years, 2 months ago (2012-10-02 23:08:57 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grv@chromium.org/10977048/17001
8 years, 2 months ago (2012-10-02 23:10:11 UTC) #10
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/installed_loader.cc: While running patch -p1 --forward --force; patching file chrome/browser/extensions/installed_loader.cc ...
8 years, 2 months ago (2012-10-02 23:10:20 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grv@chromium.org/10977048/5021
8 years, 2 months ago (2012-10-02 23:26:24 UTC) #12
commit-bot: I haz the power
Presubmit check for 10977048-5021 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-10-02 23:26:35 UTC) #13
Gaurav
@jennb : chrome/browser/ui/panels/base_panel_browser_test.cc @estade: chrome/browser/media_gallery/ Thanks
8 years, 2 months ago (2012-10-02 23:32:19 UTC) #14
jennb
LGTM for panels
8 years, 2 months ago (2012-10-03 00:38:25 UTC) #15
Evan Stade
lgtm for media galleries (feel free to TBR such changes in the future)
8 years, 2 months ago (2012-10-04 08:40:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grv@chromium.org/10977048/5021
8 years, 2 months ago (2012-10-04 14:25:10 UTC) #17
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-04 14:58:07 UTC) #18
Gaurav
@nick : need LGTM for chrome/browser/sync/test/integration/
8 years, 2 months ago (2012-10-04 20:06:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grv@chromium.org/10977048/22004
8 years, 2 months ago (2012-10-04 20:19:36 UTC) #20
commit-bot: I haz the power
Failed to apply the patch. Sending chrome/browser/extensions/app_process_apitest.cc Sending chrome/browser/extensions/crx_installer.cc Sending chrome/browser/extensions/extension_browsertest.cc Sending chrome/browser/extensions/extension_prefs.cc Sending chrome/browser/extensions/extension_prefs.h ...
8 years, 2 months ago (2012-10-05 01:00:22 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/grv@chromium.org/10977048/22004
8 years, 2 months ago (2012-10-05 16:57:02 UTC) #22
commit-bot: I haz the power
8 years, 2 months ago (2012-10-05 16:57:08 UTC) #23
Failed to apply patch for chrome/browser/extensions/app_process_apitest.cc:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file chrome/browser/extensions/app_process_apitest.cc
  Hunk #1 FAILED at 263.
  1 out of 1 hunk FAILED -- saving rejects to file
chrome/browser/extensions/app_process_apitest.cc.rej

Patch:       chrome/browser/extensions/app_process_apitest.cc
Index: chrome/browser/extensions/app_process_apitest.cc
diff --git a/chrome/browser/extensions/app_process_apitest.cc
b/chrome/browser/extensions/app_process_apitest.cc
index
cc5b3ee568607d352120207d5602913f9fb15892..f1cdebf8c9babff6a0ffa2cf198e401930b06b7e
100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -263,7 +263,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest,
BookmarkAppGetsNormalProcess) {
       Extension::LOAD,
       Extension::FROM_BOOKMARK,
       &error));
-  service->OnExtensionInstalled(extension, false,
+  service->OnExtensionInstalled(extension,
                                 syncer::StringOrdinal::CreateInitialOrdinal(),
                                 false /* no requirement errors */);
   ASSERT_TRUE(extension.get());

Powered by Google App Engine
This is Rietveld 408576698