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

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

Issue 6902054: [Sync] Rip out overly-complicated ExtensionData class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_data.h" 5 #include "chrome/browser/extensions/extension_sync_data.h"
6 6
7 #include "base/logging.h"
8
7 ExtensionSyncData::ExtensionSyncData() 9 ExtensionSyncData::ExtensionSyncData()
8 : uninstalled(false), enabled(false), incognito_enabled(false) {} 10 : uninstalled(false), enabled(false), incognito_enabled(false) {}
9 11
10 ExtensionSyncData::~ExtensionSyncData() {} 12 ExtensionSyncData::~ExtensionSyncData() {}
13
14 void ExtensionSyncData::Merge(const ExtensionSyncData& new_data) {
15 DCHECK_EQ(id, new_data.id);
asargent_no_longer_on_chrome 2011/04/27 18:48:43 nit: change this to a CHECK_EQ
akalin 2011/04/27 21:25:32 Done. Also changed the other DCHECKs.
16 DCHECK(!uninstalled);
17 DCHECK(!new_data.uninstalled);
18
19 // Copy version-independent properties.
20 enabled = new_data.enabled;
21 incognito_enabled = new_data.incognito_enabled;
22
23 // Copy version-dependent properties if version <= new_data.version.
24 if (version.CompareTo(new_data.version) <= 0) {
25 version = new_data.version;
26 update_url = new_data.update_url;
27 name = new_data.name;
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698