Skip to content

Commit

Permalink
GuestView: Remove unnecessary member variable
Browse files Browse the repository at this point in the history
BUG=351824

Review URL: https://codereview.chromium.org/264653004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267488 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
fsamuel@chromium.org committed May 1, 2014
1 parent 37ed14e commit 38fe437
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions chrome/browser/guest_view/guest_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ class GuestView : public GuestViewBase {
}

// GuestViewBase implementation.
virtual const std::string& GetViewType() const OVERRIDE { return type_; }
virtual const char* GetViewType() const OVERRIDE {
return T::Type;
}

protected:
GuestView(content::WebContents* guest_web_contents,
const std::string& embedder_extension_id)
: GuestViewBase(guest_web_contents, embedder_extension_id),
type_(T::Type) {}
: GuestViewBase(guest_web_contents, embedder_extension_id) {}

private:
std::string type_;
DISALLOW_COPY_AND_ASSIGN(GuestView);
};

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/guest_view/guest_view_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate {
// Returns a *ViewGuest if this GuestView is of the given view type.
template <typename T>
T* As() {
if (GetViewType() == T::Type) {
if (!strcmp(GetViewType(), T::Type)) {
return static_cast<T*>(this);
}
return NULL;
Expand Down Expand Up @@ -69,7 +69,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate {
static void GetDefaultContentSettingRules(RendererContentSettingRules* rules,
bool incognito);

virtual const std::string& GetViewType() const = 0;
virtual const char* GetViewType() const = 0;

virtual void Attach(content::WebContents* embedder_web_contents,
const base::DictionaryValue& args);
Expand Down

0 comments on commit 38fe437

Please sign in to comment.