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

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

Issue 510313002: Extensions-related fixups for scoped_refptr conversion operator removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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_EXTENSION_INSTALL_CHECKER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Otherwise it will be invoked when all checks have completed. |callback| 49 // Otherwise it will be invoked when all checks have completed. |callback|
50 // will only be called once. 50 // will only be called once.
51 // This function must be called on the UI thread. The callback also occurs on 51 // This function must be called on the UI thread. The callback also occurs on
52 // the UI thread. Checks may run asynchronously in parallel. 52 // the UI thread. Checks may run asynchronously in parallel.
53 // If checks are currently running, the caller must wait for the callback to 53 // If checks are currently running, the caller must wait for the callback to
54 // be invoked before starting another set of checks. 54 // be invoked before starting another set of checks.
55 void Start(int enabled_checks, bool fail_fast, const Callback& callback); 55 void Start(int enabled_checks, bool fail_fast, const Callback& callback);
56 56
57 Profile* profile() const { return profile_; } 57 Profile* profile() const { return profile_; }
58 58
59 scoped_refptr<const Extension> extension() { return extension_; } 59 const scoped_refptr<const Extension>& extension() { return extension_; }
60 void set_extension(const Extension* extension) { extension_ = extension; } 60 void set_extension(const scoped_refptr<const Extension>& extension) {
61 extension_ = extension;
62 }
61 63
62 // Returns true if any checks are currently running. 64 // Returns true if any checks are currently running.
63 bool is_running() const { return running_checks_ != 0; } 65 bool is_running() const { return running_checks_ != 0; }
64 66
65 // Returns the requirement violations. A non-empty list is considered to be 67 // Returns the requirement violations. A non-empty list is considered to be
66 // a check failure. 68 // a check failure.
67 const std::vector<std::string>& requirement_errors() const { 69 const std::vector<std::string>& requirement_errors() const {
68 return requirement_errors_; 70 return requirement_errors_;
69 } 71 }
70 72
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 Callback callback_; 126 Callback callback_;
125 127
126 base::WeakPtrFactory<ExtensionInstallChecker> weak_ptr_factory_; 128 base::WeakPtrFactory<ExtensionInstallChecker> weak_ptr_factory_;
127 129
128 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallChecker); 130 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallChecker);
129 }; 131 };
130 132
131 } // namespace extensions 133 } // namespace extensions
132 134
133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_ 135 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_CHECKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_disabled_ui.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698