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

Unified Diff: components/update_client/update_client.h

Issue 2483513002: Revert of Makes the component installers return a Result instead of a bool. (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/test_installer.cc ('k') | components/update_client/update_client_errors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_client.h
diff --git a/components/update_client/update_client.h b/components/update_client/update_client.h
index f58e82092fa11ee7a23a2c410c0fb8ceb9c79940..138915b15c7a54e8882339b80108471440d7332a 100644
--- a/components/update_client/update_client.h
+++ b/components/update_client/update_client.h
@@ -15,7 +15,6 @@
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/version.h"
-#include "components/update_client/update_client_errors.h"
// The UpdateClient class is a facade with a simple interface. The interface
// exposes a few APIs to install a CRX or update a group of CRXs.
@@ -150,16 +149,6 @@
// Defines an interface for a generic CRX installer.
class CrxInstaller : public base::RefCountedThreadSafe<CrxInstaller> {
public:
- // Contains the result of the Install operation.
- struct Result {
- explicit Result(int error, int extended_error = 0)
- : error(error), extended_error(extended_error) {}
- explicit Result(InstallError error, int extended_error = 0)
- : error(static_cast<int>(error)), extended_error(extended_error) {}
- int error = 0; // 0 indicates that install has been successful.
- int extended_error = 0;
- };
-
// Called on the main thread when there was a problem unpacking or
// verifying the CRX. |error| is a non-zero value which is only meaningful
// to the caller.
@@ -170,8 +159,8 @@
// as a json dictionary.|unpack_path| contains the temporary directory
// with all the unpacked CRX files.
// This method may be called from a thread other than the main thread.
- virtual Result Install(const base::DictionaryValue& manifest,
- const base::FilePath& unpack_path) = 0;
+ virtual bool Install(const base::DictionaryValue& manifest,
+ const base::FilePath& unpack_path) = 0;
// Sets |installed_file| to the full path to the installed |file|. |file| is
// the filename of the file in this CRX. Returns false if this is
« no previous file with comments | « components/update_client/test_installer.cc ('k') | components/update_client/update_client_errors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698