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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 39206: NO CODE CHANGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Implementation of the SafeBrowsingBlockingPage class. 5 // Implementation of the SafeBrowsingBlockingPage class.
6 6
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 20 matching lines...) Expand all
31 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=googlechrome"; 31 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=googlechrome";
32 #else 32 #else
33 static const char* const kSbDiagnosticUrl = 33 static const char* const kSbDiagnosticUrl =
34 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=chromium"; 34 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=chromium";
35 #endif 35 #endif
36 36
37 static const char* const kSbReportPhishingUrl = 37 static const char* const kSbReportPhishingUrl =
38 "http://www.google.com/safebrowsing/report_error/"; 38 "http://www.google.com/safebrowsing/report_error/";
39 39
40 static const wchar_t* const kSbDiagnosticHtml = 40 static const wchar_t* const kSbDiagnosticHtml =
41 L"<a href=\"\" onClick=\"sendCommand('showDiagnostic'); return false;\" onMo useDown=\"return false;\">%ls</a>"; 41 L"<a href=\"\" onClick=\"sendCommand('showDiagnostic'); return false;\" "
42 L"onMouseDown=\"return false;\">%ls</a>";
42 43
43 // The commands returned by the page when the user performs an action. 44 // The commands returned by the page when the user performs an action.
44 static const char* const kShowDiagnosticCommand = "showDiagnostic"; 45 static const char* const kShowDiagnosticCommand = "showDiagnostic";
45 static const char* const kReportErrorCommand = "reportError"; 46 static const char* const kReportErrorCommand = "reportError";
46 static const char* const kLearnMoreCommand = "learnMore"; 47 static const char* const kLearnMoreCommand = "learnMore";
47 static const char* const kProceedCommand = "proceed"; 48 static const char* const kProceedCommand = "proceed";
48 static const char* const kTakeMeBackCommand = "takeMeBack"; 49 static const char* const kTakeMeBackCommand = "takeMeBack";
49 50
50 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage( 51 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
51 SafeBrowsingService* sb_service, 52 SafeBrowsingService* sb_service,
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 (*unsafe_resource_map)[web_contents].push_back(unsafe_resource); 430 (*unsafe_resource_map)[web_contents].push_back(unsafe_resource);
430 } 431 }
431 432
432 // static 433 // static
433 bool SafeBrowsingBlockingPage::IsMainPage( 434 bool SafeBrowsingBlockingPage::IsMainPage(
434 const UnsafeResourceList& unsafe_resources) { 435 const UnsafeResourceList& unsafe_resources) {
435 return unsafe_resources.size() == 1 && 436 return unsafe_resources.size() == 1 &&
436 unsafe_resources[0].resource_type == ResourceType::MAIN_FRAME; 437 unsafe_resources[0].resource_type == ResourceType::MAIN_FRAME;
437 } 438 }
438 439
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_parser_unittest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database_bloom.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698