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

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

Issue 2054773002: Replace the WAS_INSTALLED_BY_CUSTODIAN creation flag with a pref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing the build 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 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
11 PendingExtensionInfo::PendingExtensionInfo( 11 PendingExtensionInfo::PendingExtensionInfo(
12 const std::string& id, 12 const std::string& id,
13 const std::string& install_parameter, 13 const std::string& install_parameter,
14 const GURL& update_url, 14 const GURL& update_url,
15 const Version& version, 15 const Version& version,
16 ShouldAllowInstallPredicate should_allow_install, 16 ShouldAllowInstallPredicate should_allow_install,
17 bool is_from_sync, 17 bool is_from_sync,
18 Manifest::Location install_source, 18 Manifest::Location install_source,
19 int creation_flags,
20 bool mark_acknowledged, 19 bool mark_acknowledged,
21 bool remote_install) 20 bool remote_install)
22 : id_(id), 21 : id_(id),
23 update_url_(update_url), 22 update_url_(update_url),
24 version_(version), 23 version_(version),
25 install_parameter_(install_parameter), 24 install_parameter_(install_parameter),
26 should_allow_install_(should_allow_install), 25 should_allow_install_(should_allow_install),
27 is_from_sync_(is_from_sync), 26 is_from_sync_(is_from_sync),
28 install_source_(install_source), 27 install_source_(install_source),
29 creation_flags_(creation_flags),
30 mark_acknowledged_(mark_acknowledged), 28 mark_acknowledged_(mark_acknowledged),
31 remote_install_(remote_install) { 29 remote_install_(remote_install) {
32 } 30 }
33 31
34 PendingExtensionInfo::PendingExtensionInfo() 32 PendingExtensionInfo::PendingExtensionInfo()
35 : update_url_(), 33 : update_url_(),
36 should_allow_install_(NULL), 34 should_allow_install_(NULL),
37 is_from_sync_(true), 35 is_from_sync_(true),
38 install_source_(Manifest::INVALID_LOCATION), 36 install_source_(Manifest::INVALID_LOCATION),
39 creation_flags_(0),
40 mark_acknowledged_(false), 37 mark_acknowledged_(false),
41 remote_install_(false) { 38 remote_install_(false) {
42 } 39 }
43 40
44 PendingExtensionInfo::PendingExtensionInfo(const PendingExtensionInfo& other) = 41 PendingExtensionInfo::PendingExtensionInfo(const PendingExtensionInfo& other) =
45 default; 42 default;
46 43
47 PendingExtensionInfo::~PendingExtensionInfo() {} 44 PendingExtensionInfo::~PendingExtensionInfo() {}
48 45
49 bool PendingExtensionInfo::operator==(const PendingExtensionInfo& rhs) const { 46 bool PendingExtensionInfo::operator==(const PendingExtensionInfo& rhs) const {
(...skipping 20 matching lines...) Expand all
70 // Different install sources; |this| has higher precedence if 67 // Different install sources; |this| has higher precedence if
71 // |install_source_| is the higher priority source. 68 // |install_source_| is the higher priority source.
72 Manifest::Location higher_priority_source = 69 Manifest::Location higher_priority_source =
73 Manifest::GetHigherPriorityLocation( 70 Manifest::GetHigherPriorityLocation(
74 install_source_, other.install_source_); 71 install_source_, other.install_source_);
75 72
76 return higher_priority_source == install_source_ ? 1 : -1; 73 return higher_priority_source == install_source_ ? 1 : -1;
77 } 74 }
78 75
79 } // namespace extensions 76 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pending_extension_info.h ('k') | chrome/browser/extensions/pending_extension_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698