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

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

Issue 6340015: Revert 72408 - Fix leak.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 GoogleURLTrackerInfoBarDelegate::~GoogleURLTrackerInfoBarDelegate() { 67 GoogleURLTrackerInfoBarDelegate::~GoogleURLTrackerInfoBarDelegate() {
68 } 68 }
69 69
70 string16 GoogleURLTrackerInfoBarDelegate::GetMessageText() const { 70 string16 GoogleURLTrackerInfoBarDelegate::GetMessageText() const {
71 // TODO(ukai): change new_google_url to google_base_domain? 71 // TODO(ukai): change new_google_url to google_base_domain?
72 return l10n_util::GetStringFUTF16(IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE, 72 return l10n_util::GetStringFUTF16(IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE,
73 UTF8ToUTF16(new_google_url_.spec())); 73 UTF8ToUTF16(new_google_url_.spec()));
74 } 74 }
75 75
76 int GoogleURLTrackerInfoBarDelegate::GetButtons() const {
77 return BUTTON_OK | BUTTON_CANCEL;
78 }
79
76 string16 GoogleURLTrackerInfoBarDelegate::GetButtonLabel( 80 string16 GoogleURLTrackerInfoBarDelegate::GetButtonLabel(
77 InfoBarButton button) const { 81 InfoBarButton button) const {
78 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? 82 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
79 IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL : 83 IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL :
80 IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL); 84 IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL);
81 } 85 }
82 86
83 87
84 // GoogleURLTracker ----------------------------------------------------------- 88 // GoogleURLTracker -----------------------------------------------------------
85 89
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 371 }
368 372
369 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary( 373 void GoogleURLTracker::ShowGoogleURLInfoBarIfNecessary(
370 TabContents* tab_contents) { 374 TabContents* tab_contents) {
371 if (!need_to_prompt_) 375 if (!need_to_prompt_)
372 return; 376 return;
373 DCHECK(!fetched_google_url_.is_empty()); 377 DCHECK(!fetched_google_url_.is_empty());
374 378
375 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_); 379 infobar_ = (*infobar_creator_)(tab_contents, this, fetched_google_url_);
376 } 380 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698