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

Side by Side Diff: chrome/browser/extensions/api/developer_private/extension_info_generator.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERATOR _H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERATOR _H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERATOR _H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERATOR _H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool include_terminated, 54 bool include_terminated,
55 const ExtensionInfosCallback& callback); 55 const ExtensionInfosCallback& callback);
56 56
57 private: 57 private:
58 // Creates an ExtensionInfo for the given |extension| and |state|, and 58 // Creates an ExtensionInfo for the given |extension| and |state|, and
59 // asynchronously adds it to the |list|. 59 // asynchronously adds it to the |list|.
60 void CreateExtensionInfoHelper(const Extension& extension, 60 void CreateExtensionInfoHelper(const Extension& extension,
61 api::developer_private::ExtensionState state); 61 api::developer_private::ExtensionState state);
62 62
63 // Callback for the asynchronous image loading. 63 // Callback for the asynchronous image loading.
64 void OnImageLoaded(scoped_ptr<api::developer_private::ExtensionInfo> info, 64 void OnImageLoaded(
65 const gfx::Image& image); 65 std::unique_ptr<api::developer_private::ExtensionInfo> info,
66 const gfx::Image& image);
66 67
67 // Returns the icon url for the default icon to use. 68 // Returns the icon url for the default icon to use.
68 const std::string& GetDefaultIconUrl(bool is_app, bool is_disabled); 69 const std::string& GetDefaultIconUrl(bool is_app, bool is_disabled);
69 70
70 // Returns an icon url from the given image, optionally applying a greyscale. 71 // Returns an icon url from the given image, optionally applying a greyscale.
71 std::string GetIconUrlFromImage(const gfx::Image& image, 72 std::string GetIconUrlFromImage(const gfx::Image& image,
72 bool should_greyscale); 73 bool should_greyscale);
73 74
74 // Various systems, cached for convenience. 75 // Various systems, cached for convenience.
75 content::BrowserContext* browser_context_; 76 content::BrowserContext* browser_context_;
(...skipping 21 matching lines...) Expand all
97 ExtensionInfosCallback callback_; 98 ExtensionInfosCallback callback_;
98 99
99 base::WeakPtrFactory<ExtensionInfoGenerator> weak_factory_; 100 base::WeakPtrFactory<ExtensionInfoGenerator> weak_factory_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoGenerator); 102 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoGenerator);
102 }; 103 };
103 104
104 } // namespace extensions 105 } // namespace extensions
105 106
106 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERA TOR_H_ 107 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_EXTENSION_INFO_GENERA TOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698