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

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

Issue 1136543003: Extensions: Store disable reasons in Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app_sync_data.h" 5 #include "chrome/browser/extensions/app_sync_data.h"
6 6
7 #include "chrome/common/extensions/manifest_handlers/app_icon_color_info.h" 7 #include "chrome/common/extensions/manifest_handlers/app_icon_color_info.h"
8 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" 8 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
9 #include "chrome/common/extensions/manifest_handlers/linked_app_icons.h" 9 #include "chrome/common/extensions/manifest_handlers/linked_app_icons.h"
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
11 #include "sync/api/sync_data.h" 11 #include "sync/api/sync_data.h"
12 #include "sync/protocol/app_specifics.pb.h" 12 #include "sync/protocol/app_specifics.pb.h"
13 #include "sync/protocol/sync.pb.h" 13 #include "sync/protocol/sync.pb.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 AppSyncData::LinkedAppIconInfo::LinkedAppIconInfo() { 17 AppSyncData::LinkedAppIconInfo::LinkedAppIconInfo() {
18 } 18 }
19 19
20 AppSyncData::LinkedAppIconInfo::~LinkedAppIconInfo() { 20 AppSyncData::LinkedAppIconInfo::~LinkedAppIconInfo() {
21 } 21 }
22 22
23 AppSyncData::AppSyncData() {} 23 AppSyncData::AppSyncData() {}
24 24
25 AppSyncData::AppSyncData(const Extension& extension, 25 AppSyncData::AppSyncData(const Extension& extension,
26 bool enabled, 26 bool enabled,
27 int disable_reasons,
27 bool incognito_enabled, 28 bool incognito_enabled,
28 bool remote_install, 29 bool remote_install,
29 ExtensionSyncData::OptionalBoolean all_urls_enabled, 30 ExtensionSyncData::OptionalBoolean all_urls_enabled,
30 const syncer::StringOrdinal& app_launch_ordinal, 31 const syncer::StringOrdinal& app_launch_ordinal,
31 const syncer::StringOrdinal& page_ordinal, 32 const syncer::StringOrdinal& page_ordinal,
32 extensions::LaunchType launch_type) 33 extensions::LaunchType launch_type)
33 : extension_sync_data_(extension, 34 : extension_sync_data_(extension,
34 enabled, 35 enabled,
36 disable_reasons,
35 incognito_enabled, 37 incognito_enabled,
36 remote_install, 38 remote_install,
37 all_urls_enabled), 39 all_urls_enabled),
38 app_launch_ordinal_(app_launch_ordinal), 40 app_launch_ordinal_(app_launch_ordinal),
39 page_ordinal_(page_ordinal), 41 page_ordinal_(page_ordinal),
40 launch_type_(launch_type) { 42 launch_type_(launch_type) {
41 if (extension.from_bookmark()) { 43 if (extension.from_bookmark()) {
42 bookmark_app_description_ = extension.description(); 44 bookmark_app_description_ = extension.description();
43 bookmark_app_url_ = AppLaunchInfo::GetLaunchWebURL(&extension).spec(); 45 bookmark_app_url_ = AppLaunchInfo::GetLaunchWebURL(&extension).spec();
44 bookmark_app_icon_color_ = AppIconColorInfo::GetIconColorString(&extension); 46 bookmark_app_icon_color_ = AppIconColorInfo::GetIconColorString(&extension);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 159 }
158 160
159 return true; 161 return true;
160 } 162 }
161 163
162 bool AppSyncData::PopulateFromSyncData(const syncer::SyncData& sync_data) { 164 bool AppSyncData::PopulateFromSyncData(const syncer::SyncData& sync_data) {
163 return PopulateFromAppSpecifics(sync_data.GetSpecifics().app()); 165 return PopulateFromAppSpecifics(sync_data.GetSpecifics().app());
164 } 166 }
165 167
166 } // namespace extensions 168 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698