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

Unified Diff: chrome/browser/extensions/tab_helper.h

Issue 2134653003: [Extensions] Update TabHelper to use ExtensionId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/tab_helper.h
diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
index 6a79054d01de92a65356ac53d41a4b3314b6540a..a3920704999b2578eb7d8f28a37d2179350116b0 100644
--- a/chrome/browser/extensions/tab_helper.h
+++ b/chrome/browser/extensions/tab_helper.h
@@ -26,6 +26,7 @@
#include "extensions/browser/extension_registry_observer.h"
#include "extensions/browser/script_execution_observer.h"
#include "extensions/browser/script_executor.h"
+#include "extensions/common/extension_id.h"
#include "extensions/common/stack_frame.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -82,10 +83,10 @@ class TabHelper : public content::WebContentsObserver,
// Convenience for setting the app extension by id. This does nothing if
// |extension_app_id| is empty, or an extension can't be found given the
// specified id.
- void SetExtensionAppById(const std::string& extension_app_id);
+ void SetExtensionAppById(const ExtensionId& extension_app_id);
// Set just the app icon, used by panels created by an extension.
- void SetExtensionAppIconById(const std::string& extension_app_id);
+ void SetExtensionAppIconById(const ExtensionId& extension_app_id);
const Extension* extension_app() const { return extension_app_; }
bool is_app() const { return extension_app_ != NULL; }
@@ -193,14 +194,14 @@ class TabHelper : public content::WebContentsObserver,
// the extension's image asynchronously.
void UpdateExtensionAppIcon(const Extension* extension);
- const Extension* GetExtension(const std::string& extension_app_id);
+ const Extension* GetExtension(const ExtensionId& extension_app_id);
void OnImageLoaded(const gfx::Image& image);
// WebstoreStandaloneInstaller::Callback.
void OnInlineInstallComplete(int install_id,
int return_route_id,
- const std::string& extension_id,
+ const ExtensionId& extension_id,
bool success,
const std::string& error,
webstore_install::Result result);
@@ -208,7 +209,7 @@ class TabHelper : public content::WebContentsObserver,
// ExtensionReenabler::Callback.
void OnReenableComplete(int install_id,
int return_route_id,
- const std::string& extension_id,
+ const ExtensionId& extension_id,
ExtensionReenabler::ReenableResult result);
// content::NotificationObserver.
@@ -274,13 +275,13 @@ class TabHelper : public content::WebContentsObserver,
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
registry_observer_;
- // Map of extension id -> InlineInstallObserver for inline installations that
- // have progress listeners.
- std::map<std::string, std::unique_ptr<InlineInstallObserver>>
+ // Map of InlineInstallObservers for inline installations that have progress
+ // listeners.
+ std::map<ExtensionId, std::unique_ptr<InlineInstallObserver>>
install_observers_;
// The set of extension ids that are currently being installed.
- std::set<std::string> pending_inline_installations_;
+ std::set<ExtensionId> pending_inline_installations_;
// Vend weak pointers that can be invalidated to stop in-progress loads.
base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
« no previous file with comments | « no previous file | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698