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

Side by Side Diff: chrome/browser/interstitials/security_interstitial_page.h

Issue 1000333003: Properly decode IDN in interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move test commands to negative values, and control flow nit Created 5 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/interstitials/security_interstitial_page.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ 5 #ifndef CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_
6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ 6 #define CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/public/browser/interstitial_page_delegate.h" 9 #include "content/public/browser/interstitial_page_delegate.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace base { 12 namespace base {
13 class DictionaryValue; 13 class DictionaryValue;
14 } 14 }
15 15
16 namespace content { 16 namespace content {
17 class InterstitialPage; 17 class InterstitialPage;
18 class WebContents; 18 class WebContents;
19 } 19 }
20 20
21 class SecurityInterstitialPage : public content::InterstitialPageDelegate { 21 class SecurityInterstitialPage : public content::InterstitialPageDelegate {
22 public: 22 public:
23 // These represent the commands sent from the interstitial JavaScript. 23 // These represent the commands sent from the interstitial JavaScript.
24 // DO NOT reorder or change these without also changing the JavaScript! 24 // DO NOT reorder or change these without also changing the JavaScript!
25 // See chrome/browser/resources/security_warnings/interstitial_v2.js 25 // See chrome/browser/resources/security_warnings/interstitial_v2.js
26 enum SecurityInterstitialCommands { 26 enum SecurityInterstitialCommands {
27 // Used by tests
28 CMD_TEXT_FOUND = -2,
29 CMD_TEXT_NOT_FOUND = -1,
27 // Decisions 30 // Decisions
28 CMD_DONT_PROCEED = 0, 31 CMD_DONT_PROCEED = 0,
29 CMD_PROCEED = 1, 32 CMD_PROCEED = 1,
30 // Ways for user to get more information 33 // Ways for user to get more information
31 CMD_SHOW_MORE_SECTION = 2, 34 CMD_SHOW_MORE_SECTION = 2,
32 CMD_OPEN_HELP_CENTER = 3, 35 CMD_OPEN_HELP_CENTER = 3,
33 CMD_OPEN_DIAGNOSTIC = 4, 36 CMD_OPEN_DIAGNOSTIC = 4,
34 // Primary button actions 37 // Primary button actions
35 CMD_RELOAD = 5, 38 CMD_RELOAD = 5,
36 CMD_OPEN_DATE_SETTINGS = 6, 39 CMD_OPEN_DATE_SETTINGS = 6,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Once shown, |interstitial_page| takes ownership of this 78 // Once shown, |interstitial_page| takes ownership of this
76 // SecurityInterstitialPage instance. 79 // SecurityInterstitialPage instance.
77 content::InterstitialPage* interstitial_page_; 80 content::InterstitialPage* interstitial_page_;
78 // Whether the interstitial should create a view. 81 // Whether the interstitial should create a view.
79 bool create_view_; 82 bool create_view_;
80 83
81 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); 84 DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage);
82 }; 85 };
83 86
84 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_ 87 #endif // CHROME_BROWSER_INTERSTITIALS_SECURITY_INTERSTITIAL_PAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/interstitials/security_interstitial_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698