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

Side by Side Diff: chrome/browser/extensions/extension_sync_service.cc

Issue 2004043002: Supervised Users Initiated Installs v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kid_initiated_install
Patch Set: Response to code review by Devlin and fixing a test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_sync_service.h" 5 #include "chrome/browser/extensions/extension_sync_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 syncer::SyncDataList ToSyncerSyncDataList( 99 syncer::SyncDataList ToSyncerSyncDataList(
100 const std::vector<ExtensionSyncData>& data) { 100 const std::vector<ExtensionSyncData>& data) {
101 syncer::SyncDataList result; 101 syncer::SyncDataList result;
102 result.reserve(data.size()); 102 result.reserve(data.size());
103 for (const ExtensionSyncData& item : data) 103 for (const ExtensionSyncData& item : data)
104 result.push_back(item.GetSyncData()); 104 result.push_back(item.GetSyncData());
105 return result; 105 return result;
106 } 106 }
107 107
108 static_assert(Extension::DISABLE_REASON_LAST == (1 << 15), 108 static_assert(Extension::DISABLE_REASON_LAST == (1 << 16),
109 "Please consider whether your new disable reason should be" 109 "Please consider whether your new disable reason should be"
110 " syncable, and if so update this bitmask accordingly!"); 110 " syncable, and if so update this bitmask accordingly!");
111 const int kKnownSyncableDisableReasons = 111 const int kKnownSyncableDisableReasons =
112 Extension::DISABLE_USER_ACTION | 112 Extension::DISABLE_USER_ACTION |
113 Extension::DISABLE_PERMISSIONS_INCREASE | 113 Extension::DISABLE_PERMISSIONS_INCREASE |
114 Extension::DISABLE_SIDELOAD_WIPEOUT | 114 Extension::DISABLE_SIDELOAD_WIPEOUT |
115 Extension::DISABLE_GREYLIST | 115 Extension::DISABLE_GREYLIST |
116 Extension::DISABLE_REMOTE_INSTALL; 116 Extension::DISABLE_REMOTE_INSTALL;
117 const int kAllKnownDisableReasons = Extension::DISABLE_REASON_LAST - 1; 117 const int kAllKnownDisableReasons = Extension::DISABLE_REASON_LAST - 1;
118 // We also include any future bits for newer clients that added another disable 118 // We also include any future bits for newer clients that added another disable
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 sync_data_list->push_back(CreateSyncData(*extension)); 710 sync_data_list->push_back(CreateSyncData(*extension));
711 } 711 }
712 } 712 }
713 } 713 }
714 714
715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { 715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const {
716 // Themes are handled by the ThemeSyncableService. 716 // Themes are handled by the ThemeSyncableService.
717 return extensions::util::ShouldSync(&extension, profile_) && 717 return extensions::util::ShouldSync(&extension, profile_) &&
718 !extension.is_theme(); 718 !extension.is_theme();
719 } 719 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698