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

Side by Side Diff: chrome/browser/google/google_url_tracker.cc

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/google/google_url_tracker.h" 5 #include "chrome/browser/google/google_url_tracker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 google_url_tracker_->AcceptGoogleURL(new_google_url_); 52 google_url_tracker_->AcceptGoogleURL(new_google_url_);
53 google_url_tracker_->RedoSearch(); 53 google_url_tracker_->RedoSearch();
54 return true; 54 return true;
55 } 55 }
56 56
57 bool GoogleURLTrackerInfoBarDelegate::Cancel() { 57 bool GoogleURLTrackerInfoBarDelegate::Cancel() {
58 google_url_tracker_->CancelGoogleURL(new_google_url_); 58 google_url_tracker_->CancelGoogleURL(new_google_url_);
59 return true; 59 return true;
60 } 60 }
61 61
62 void GoogleURLTrackerInfoBarDelegate::InfoBarClosed() { 62 GoogleURLTrackerInfoBarDelegate::~GoogleURLTrackerInfoBarDelegate() {
63 google_url_tracker_->InfoBarClosed(); 63 google_url_tracker_->InfoBarClosed();
64 delete this;
65 }
66
67 GoogleURLTrackerInfoBarDelegate::~GoogleURLTrackerInfoBarDelegate() {
68 } 64 }
69 65
70 string16 GoogleURLTrackerInfoBarDelegate::GetMessageText() const { 66 string16 GoogleURLTrackerInfoBarDelegate::GetMessageText() const {
71 // TODO(ukai): change new_google_url to google_base_domain? 67 // TODO(ukai): change new_google_url to google_base_domain?
72 return l10n_util::GetStringFUTF16(IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE, 68 return l10n_util::GetStringFUTF16(IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE,
73 UTF8ToUTF16(new_google_url_.spec())); 69 UTF8ToUTF16(new_google_url_.spec()));
74 } 70 }
75 71
76 string16 GoogleURLTrackerInfoBarDelegate::GetButtonLabel( 72 string16 GoogleURLTrackerInfoBarDelegate::GetButtonLabel(
77 InfoBarButton button) const { 73 InfoBarButton button) const {
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 351 }
356 352
357 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary( 353 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary(
358 TabContents* tab_contents) { 354 TabContents* tab_contents) {
359 if (!need_to_prompt_) 355 if (!need_to_prompt_)
360 return; 356 return;
361 DCHECK(!fetched_google_url_.is_empty()); 357 DCHECK(!fetched_google_url_.is_empty());
362 358
363 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_); 359 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_);
364 } 360 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_url_tracker.h ('k') | chrome/browser/notifications/desktop_notification_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698