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

Side by Side Diff: chrome/browser/tab_contents/insecure_content_infobar_delegate.cc

Issue 7631063: Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/tab_contents/insecure_content_infobar_delegate.h" 5 #include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/google/google_util.h" 8 #include "chrome/browser/google/google_util.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Cancel button is labelled "load anyways". It triggers Cancel(), but really 61 // Cancel button is labelled "load anyways". It triggers Cancel(), but really
62 // means become insecure, so do the work of reloading the page. 62 // means become insecure, so do the work of reloading the page.
63 bool InsecureContentInfoBarDelegate::Cancel() { 63 bool InsecureContentInfoBarDelegate::Cancel() {
64 UMA_HISTOGRAM_ENUMERATION("InsecureContentInfoBarDelegateV2", 64 UMA_HISTOGRAM_ENUMERATION("InsecureContentInfoBarDelegateV2",
65 (type_ == DISPLAY) ? DISPLAY_USER_OVERRIDE : RUN_USER_OVERRIDE, 65 (type_ == DISPLAY) ? DISPLAY_USER_OVERRIDE : RUN_USER_OVERRIDE,
66 NUM_EVENTS); 66 NUM_EVENTS);
67 67
68 int32 routing_id = tab_contents_->routing_id(); 68 int32 routing_id = tab_contents_->routing_id();
69 tab_contents_->Send((type_ == DISPLAY) ? static_cast<IPC::Message*>( 69 tab_contents_->Send((type_ == DISPLAY) ? static_cast<IPC::Message*>(
70 new ViewMsg_SetAllowDisplayingInsecureContent(routing_id, true)) : 70 new ChromeViewMsg_SetAllowDisplayingInsecureContent(routing_id, true)) :
71 new ViewMsg_SetAllowRunningInsecureContent(routing_id, true)); 71 new ChromeViewMsg_SetAllowRunningInsecureContent(routing_id, true));
72 return true; 72 return true;
73 } 73 }
74 74
75 string16 InsecureContentInfoBarDelegate::GetLinkText() const { 75 string16 InsecureContentInfoBarDelegate::GetLinkText() const {
76 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); 76 return l10n_util::GetStringUTF16(IDS_LEARN_MORE);
77 } 77 }
78 78
79 bool InsecureContentInfoBarDelegate::LinkClicked( 79 bool InsecureContentInfoBarDelegate::LinkClicked(
80 WindowOpenDisposition disposition) { 80 WindowOpenDisposition disposition) {
81 tab_contents_->tab_contents()->OpenURL( 81 tab_contents_->tab_contents()->OpenURL(
82 google_util::AppendGoogleLocaleParam(GURL( 82 google_util::AppendGoogleLocaleParam(GURL(
83 "https://www.google.com/support/chrome/bin/answer.py?answer=1342714")), 83 "https://www.google.com/support/chrome/bin/answer.py?answer=1342714")),
84 GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 84 GURL(), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
85 PageTransition::LINK); 85 PageTransition::LINK);
86 return false; 86 return false;
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698