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

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

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.h ('k') | chrome/browser/history/history.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WEBSTORE_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 // Inline installs trigger slightly different behavior (install source 38 // Inline installs trigger slightly different behavior (install source
39 // is different, download referrers are the item's page in the gallery). 39 // is different, download referrers are the item's page in the gallery).
40 FLAG_INLINE_INSTALL = 1 << 0 40 FLAG_INLINE_INSTALL = 1 << 0
41 }; 41 };
42 42
43 class Delegate { 43 class Delegate {
44 public: 44 public:
45 virtual void OnExtensionInstallSuccess(const std::string& id) = 0; 45 virtual void OnExtensionInstallSuccess(const std::string& id) = 0;
46 virtual void OnExtensionInstallFailure(const std::string& id, 46 virtual void OnExtensionInstallFailure(const std::string& id,
47 const std::string& error) = 0; 47 const std::string& error) = 0;
48
49 protected:
50 virtual ~Delegate() {}
48 }; 51 };
49 52
50 // Contains information about what parts of the extension install process can 53 // Contains information about what parts of the extension install process can
51 // be skipped or modified. If one of these is present, it means that a CRX 54 // be skipped or modified. If one of these is present, it means that a CRX
52 // download was initiated by WebstoreInstaller. The Approval instance should 55 // download was initiated by WebstoreInstaller. The Approval instance should
53 // be checked further for additional details. 56 // be checked further for additional details.
54 struct Approval : public content::DownloadItem::ExternalData { 57 struct Approval : public content::DownloadItem::ExternalData {
55 static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile); 58 static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile);
56 static scoped_ptr<Approval> CreateWithNoInstallPrompt( 59 static scoped_ptr<Approval> CreateWithNoInstallPrompt(
57 Profile* profile, 60 Profile* profile,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // The DownloadItem is owned by the DownloadManager and is valid from when 151 // The DownloadItem is owned by the DownloadManager and is valid from when
149 // OnDownloadStarted is called (with no error) until the DownloadItem 152 // OnDownloadStarted is called (with no error) until the DownloadItem
150 // transitions to state REMOVING. 153 // transitions to state REMOVING.
151 content::DownloadItem* download_item_; 154 content::DownloadItem* download_item_;
152 int flags_; 155 int flags_;
153 scoped_ptr<Approval> approval_; 156 scoped_ptr<Approval> approval_;
154 GURL download_url_; 157 GURL download_url_;
155 }; 158 };
156 159
157 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ 160 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_install_helper.h ('k') | chrome/browser/history/history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698