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

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

Issue 1731483003: chrome: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/pending_extension_info.h" 5 #include "chrome/browser/extensions/pending_extension_info.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 10
(...skipping 23 matching lines...) Expand all
34 PendingExtensionInfo::PendingExtensionInfo() 34 PendingExtensionInfo::PendingExtensionInfo()
35 : update_url_(), 35 : update_url_(),
36 should_allow_install_(NULL), 36 should_allow_install_(NULL),
37 is_from_sync_(true), 37 is_from_sync_(true),
38 install_source_(Manifest::INVALID_LOCATION), 38 install_source_(Manifest::INVALID_LOCATION),
39 creation_flags_(0), 39 creation_flags_(0),
40 mark_acknowledged_(false), 40 mark_acknowledged_(false),
41 remote_install_(false) { 41 remote_install_(false) {
42 } 42 }
43 43
44 PendingExtensionInfo::PendingExtensionInfo(const PendingExtensionInfo& other) =
45 default;
46
44 PendingExtensionInfo::~PendingExtensionInfo() {} 47 PendingExtensionInfo::~PendingExtensionInfo() {}
45 48
46 bool PendingExtensionInfo::operator==(const PendingExtensionInfo& rhs) const { 49 bool PendingExtensionInfo::operator==(const PendingExtensionInfo& rhs) const {
47 return id_ == rhs.id_; 50 return id_ == rhs.id_;
48 } 51 }
49 52
50 int PendingExtensionInfo::CompareTo(const PendingExtensionInfo& other) const { 53 int PendingExtensionInfo::CompareTo(const PendingExtensionInfo& other) const {
51 DCHECK_EQ(id_, other.id_); 54 DCHECK_EQ(id_, other.id_);
52 if (version_.IsValid() && other.version_.IsValid()) { 55 if (version_.IsValid() && other.version_.IsValid()) {
53 int comparison = version_.CompareTo(other.version_); 56 int comparison = version_.CompareTo(other.version_);
(...skipping 13 matching lines...) Expand all
67 // Different install sources; |this| has higher precedence if 70 // Different install sources; |this| has higher precedence if
68 // |install_source_| is the higher priority source. 71 // |install_source_| is the higher priority source.
69 Manifest::Location higher_priority_source = 72 Manifest::Location higher_priority_source =
70 Manifest::GetHigherPriorityLocation( 73 Manifest::GetHigherPriorityLocation(
71 install_source_, other.install_source_); 74 install_source_, other.install_source_);
72 75
73 return higher_priority_source == install_source_ ? 1 : -1; 76 return higher_priority_source == install_source_ ? 1 : -1;
74 } 77 }
75 78
76 } // namespace extensions 79 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698