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

Side by Side Diff: chrome/browser/extensions/bundle_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: Created 8 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 (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_BUNDLE_INSTALLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_BUNDLE_INSTALLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_BUNDLE_INSTALLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_BUNDLE_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public base::RefCountedThreadSafe<BundleInstaller> { 44 public base::RefCountedThreadSafe<BundleInstaller> {
45 public: 45 public:
46 // Auto approve or cancel the permission prompt. 46 // Auto approve or cancel the permission prompt.
47 static void SetAutoApproveForTesting(bool approve); 47 static void SetAutoApproveForTesting(bool approve);
48 48
49 class Delegate { 49 class Delegate {
50 public: 50 public:
51 virtual void OnBundleInstallApproved() {} 51 virtual void OnBundleInstallApproved() {}
52 virtual void OnBundleInstallCanceled(bool user_initiated) {} 52 virtual void OnBundleInstallCanceled(bool user_initiated) {}
53 virtual void OnBundleInstallCompleted() {} 53 virtual void OnBundleInstallCompleted() {}
54
55 protected:
56 virtual ~Delegate() {}
54 }; 57 };
55 58
56 // Represents an individual member of the bundle. 59 // Represents an individual member of the bundle.
57 struct Item { 60 struct Item {
58 // Items are in the PENDING state until they've been installed, or the 61 // Items are in the PENDING state until they've been installed, or the
59 // install has failed or been canceled. 62 // install has failed or been canceled.
60 enum State { 63 enum State {
61 STATE_PENDING, 64 STATE_PENDING,
62 STATE_INSTALLED, 65 STATE_INSTALLED,
63 STATE_FAILED 66 STATE_FAILED
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 scoped_ptr<ExtensionInstallUI> install_ui_; 193 scoped_ptr<ExtensionInstallUI> install_ui_;
191 194
192 Delegate* delegate_; 195 Delegate* delegate_;
193 196
194 DISALLOW_COPY_AND_ASSIGN(BundleInstaller); 197 DISALLOW_COPY_AND_ASSIGN(BundleInstaller);
195 }; 198 };
196 199
197 } // namespace extensions 200 } // namespace extensions
198 201
199 #endif // CHROME_BROWSER_EXTENSIONS_BUNDLE_INSTALLER_H_ 202 #endif // CHROME_BROWSER_EXTENSIONS_BUNDLE_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698