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

Side by Side Diff: chrome/browser/extensions/pending_extension_manager.h

Issue 264763002: Support remote installation of extensions and apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: histogram owner Created 6 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // if the extension is pending from another source which overrides 77 // if the extension is pending from another source which overrides
78 // sync installs (such as a policy extension) or if the extension 78 // sync installs (such as a policy extension) or if the extension
79 // is already installed. 79 // is already installed.
80 // 80 //
81 // TODO(akalin): Replace |install_silently| with a list of 81 // TODO(akalin): Replace |install_silently| with a list of
82 // pre-enabled permissions. 82 // pre-enabled permissions.
83 bool AddFromSync( 83 bool AddFromSync(
84 const std::string& id, 84 const std::string& id,
85 const GURL& update_url, 85 const GURL& update_url,
86 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install, 86 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
87 bool install_silently); 87 bool install_silently,
88 bool remote_install);
88 89
89 // Adds an extension that was depended on by another extension. 90 // Adds an extension that was depended on by another extension.
90 bool AddFromExtensionImport( 91 bool AddFromExtensionImport(
91 const std::string& id, 92 const std::string& id,
92 const GURL& update_url, 93 const GURL& update_url,
93 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install); 94 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install);
94 95
95 // Given an extension id and an update URL, schedule the extension 96 // Given an extension id and an update URL, schedule the extension
96 // to be fetched, installed, and activated. 97 // to be fetched, installed, and activated.
97 bool AddFromExternalUpdateUrl(const std::string& id, 98 bool AddFromExternalUpdateUrl(const std::string& id,
(...skipping 27 matching lines...) Expand all
125 bool AddExtensionImpl( 126 bool AddExtensionImpl(
126 const std::string& id, 127 const std::string& id,
127 const std::string& install_parameter, 128 const std::string& install_parameter,
128 const GURL& update_url, 129 const GURL& update_url,
129 const base::Version& version, 130 const base::Version& version,
130 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install, 131 PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
131 bool is_from_sync, 132 bool is_from_sync,
132 bool install_silently, 133 bool install_silently,
133 Manifest::Location install_source, 134 Manifest::Location install_source,
134 int creation_flags, 135 int creation_flags,
135 bool mark_acknowledged); 136 bool mark_acknowledged,
137 bool remote_install);
136 138
137 // Add a pending extension record directly. Used for unit tests that need 139 // Add a pending extension record directly. Used for unit tests that need
138 // to set an inital state. Use friendship to allow the tests to call this 140 // to set an inital state. Use friendship to allow the tests to call this
139 // method. 141 // method.
140 void AddForTesting(const PendingExtensionInfo& pending_extension_info); 142 void AddForTesting(const PendingExtensionInfo& pending_extension_info);
141 143
142 // Reference to the extension service whose pending extensions this class is 144 // Reference to the extension service whose pending extensions this class is
143 // managing. Because this class is a member of |service_|, it is created 145 // managing. Because this class is a member of |service_|, it is created
144 // and destroyed with |service_|. We only use methods from the interface 146 // and destroyed with |service_|. We only use methods from the interface
145 // ExtensionServiceInterface. 147 // ExtensionServiceInterface.
(...skipping 10 matching lines...) Expand all
156 friend void SetupPendingExtensionManagerForTest( 158 friend void SetupPendingExtensionManagerForTest(
157 int count, const GURL& update_url, 159 int count, const GURL& update_url,
158 PendingExtensionManager* pending_extension_manager); 160 PendingExtensionManager* pending_extension_manager);
159 161
160 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager); 162 DISALLOW_COPY_AND_ASSIGN(PendingExtensionManager);
161 }; 163 };
162 164
163 } // namespace extensions 165 } // namespace extensions
164 166
165 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ 167 #endif // CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pending_extension_info.cc ('k') | chrome/browser/extensions/pending_extension_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698