perf: use flat_set, flat_map for small, trivially-moved containers (#40817)
* refactor: use base::flat_map in ElectronMenuModel * refactor: use base::flat_map in BuildSubmenuFromModel() * refactor: use base::flat_map in GetDialogsMap() * refactor: use base::flat_map in DesktopCapturer * refactor: use base::flat_map, flat_set in ElectronBrowserClient * refactor: use base::flat_map in ProxyingURLLoaderFactory * refactor: use base::flat_map in MapToCommonId() * refactor: use base::flat_map for g_map_id * refactor: use base::flat_map for ViewsDelegate::AppbarAutohideEdgeMap * refactor: use base::flat_map for App::app_metrics_ * refactor: use base::flat_map for PowerSaveBlocker::wake_lock_types_ * refactor: use base::flat_map for NativeImage::hicons_ * refactor: use base::flat_map for MenuViews::menu_runners_ * refactor: use base::flat_map for WebViewManager::web_contents_embedder_map_ * refactor: use base::flat_map for InspectableWebContents::extensions_api_ * refactor: use base::flat_set for libnotify GetServerCapabilities() * refactor: use base::flat_set for InspectableWebContents::loaders_ * refactor: use base::flat_set for ElectronRendererClient::environments_ refactor: use base::flat_set for ElectronRendererClient::injected_frames_ * refactor: use base::flat_set for WebWorkerObserver::environments_
This commit is contained in:
parent
5086071294
commit
22970f573b
23 changed files with 83 additions and 87 deletions
|
@ -5,8 +5,7 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_WEB_VIEW_MANAGER_H_
|
||||
#define ELECTRON_SHELL_BROWSER_WEB_VIEW_MANAGER_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "base/containers/flat_map.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "content/public/browser/browser_plugin_guest_manager.h"
|
||||
|
||||
|
@ -38,7 +37,7 @@ class WebViewManager : public content::BrowserPluginGuestManager {
|
|||
raw_ptr<content::WebContents> embedder;
|
||||
};
|
||||
// guest_instance_id => (web_contents, embedder)
|
||||
std::map<int, WebContentsWithEmbedder> web_contents_embedder_map_;
|
||||
base::flat_map<int, WebContentsWithEmbedder> web_contents_embedder_map_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue