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

Unified Diff: chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc

Issue 11721003: Eliminate the LinkInfoBar[Delegate] classes entirely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address some nits - testing-automation matters? Created 7 years, 12 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
Index: chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc
diff --git a/chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc b/chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc
deleted file mode 100644
index 7fe8f89353e268947225bf5a4fca38af41fb1672..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/cocoa/infobars/mock_link_infobar_delegate.h"
-
-#include "base/utf_string_conversions.h"
-
-const char MockLinkInfoBarDelegate::kMessage[] = "MockLinkInfoBarMessage ";
-const char MockLinkInfoBarDelegate::kLink[] = "http://dev.chromium.org";
-
-MockLinkInfoBarDelegate::MockLinkInfoBarDelegate(Owner* owner)
- : LinkInfoBarDelegate(NULL),
- owner_(owner),
- closes_on_action_(true),
- icon_accessed_(false),
- message_text_accessed_(false),
- link_text_accessed_(false),
- link_clicked_(false) {
-}
-
-MockLinkInfoBarDelegate::~MockLinkInfoBarDelegate() {
- if (owner_)
- owner_->OnInfoBarDelegateClosed();
-}
-
-gfx::Image* MockLinkInfoBarDelegate::GetIcon() const {
- icon_accessed_ = true;
- return NULL;
-}
-
-string16 MockLinkInfoBarDelegate::GetMessageTextWithOffset(
- size_t* link_offset) const {
- message_text_accessed_ = true;
- *link_offset = arraysize(kMessage) - 1;
- return ASCIIToUTF16(kMessage);
-}
-
-string16 MockLinkInfoBarDelegate::GetLinkText() const {
- link_text_accessed_ = true;
- return ASCIIToUTF16(kLink);
-}
-
-bool MockLinkInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
- link_clicked_ = true;
- return closes_on_action_;
-}

Powered by Google App Engine
This is Rietveld 408576698