OLD | NEW |
---|---|
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_EXTENSION_UNINSTALL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 | 88 |
89 // Accessors for members. | 89 // Accessors for members. |
90 const Profile* profile() const { return profile_; } | 90 const Profile* profile() const { return profile_; } |
91 Delegate* delegate() const { return delegate_; } | 91 Delegate* delegate() const { return delegate_; } |
92 const Extension* extension() const { return extension_.get(); } | 92 const Extension* extension() const { return extension_.get(); } |
93 const Extension* triggering_extension() const { | 93 const Extension* triggering_extension() const { |
94 return triggering_extension_.get(); } | 94 return triggering_extension_.get(); } |
95 const gfx::ImageSkia& icon() const { return icon_; } | 95 const gfx::ImageSkia& icon() const { return icon_; } |
96 | 96 |
97 private: | 97 private: |
98 // Uninstalls the extension. | |
99 void Uninstall(bool& success, base::string16& error); | |
Devlin
2017/05/05 20:46:38
two notes:
- We shouldn't pass POD (like bool) by
catmullings
2017/05/15 22:27:55
What does POD mean?
Devlin
2017/05/15 23:28:04
POD refers to "Plain Old Data", and basically mean
catmullings
2017/05/18 18:25:59
Done.
| |
100 | |
98 // Handles the "report abuse" checkbox being checked at the close of the | 101 // Handles the "report abuse" checkbox being checked at the close of the |
99 // dialog. | 102 // dialog. |
100 void HandleReportAbuse(); | 103 void HandleReportAbuse(); |
101 | 104 |
102 // Sets the icon that will be used in the dialog. If |icon| contains an empty | 105 // Sets the icon that will be used in the dialog. If |icon| contains an empty |
103 // image, then we use a default icon instead. | 106 // image, then we use a default icon instead. |
104 void SetIcon(const gfx::Image& image); | 107 void SetIcon(const gfx::Image& image); |
105 | 108 |
106 void OnImageLoaded(const std::string& extension_id, const gfx::Image& image); | 109 void OnImageLoaded(const std::string& extension_id, const gfx::Image& image); |
107 | 110 |
(...skipping 19 matching lines...) Expand all Loading... | |
127 UninstallReason uninstall_reason_; | 130 UninstallReason uninstall_reason_; |
128 | 131 |
129 base::ThreadChecker thread_checker_; | 132 base::ThreadChecker thread_checker_; |
130 | 133 |
131 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); | 134 DISALLOW_COPY_AND_ASSIGN(ExtensionUninstallDialog); |
132 }; | 135 }; |
133 | 136 |
134 } // namespace extensions | 137 } // namespace extensions |
135 | 138 |
136 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ | 139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_UNINSTALL_DIALOG_H_ |
OLD | NEW |