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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 // 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 <string> 9 #include <string>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "content/browser/tab_contents/tab_contents.h" 32 #include "content/browser/tab_contents/tab_contents.h"
33 #include "content/browser/user_metrics.h" 33 #include "content/browser/user_metrics.h"
34 #include "content/public/browser/browser_thread.h" 34 #include "content/public/browser/browser_thread.h"
35 #include "grit/browser_resources.h" 35 #include "grit/browser_resources.h"
36 #include "grit/generated_resources.h" 36 #include "grit/generated_resources.h"
37 #include "grit/locale_settings.h" 37 #include "grit/locale_settings.h"
38 #include "net/base/escape.h" 38 #include "net/base/escape.h"
39 #include "ui/base/l10n/l10n_util.h" 39 #include "ui/base/l10n/l10n_util.h"
40 #include "ui/base/resource/resource_bundle.h" 40 #include "ui/base/resource/resource_bundle.h"
41 41
42 using content::BrowserThread;
43
42 // For malware interstitial pages, we link the problematic URL to Google's 44 // For malware interstitial pages, we link the problematic URL to Google's
43 // diagnostic page. 45 // diagnostic page.
44 #if defined(GOOGLE_CHROME_BUILD) 46 #if defined(GOOGLE_CHROME_BUILD)
45 static const char* const kSbDiagnosticUrl = 47 static const char* const kSbDiagnosticUrl =
46 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=googlechrome"; 48 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=googlechrome";
47 #else 49 #else
48 static const char* const kSbDiagnosticUrl = 50 static const char* const kSbDiagnosticUrl =
49 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=chromium"; 51 "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&clie nt=chromium";
50 #endif 52 #endif
51 53
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 // Client-side phishing detection interstitials never block the main frame 707 // Client-side phishing detection interstitials never block the main frame
706 // load, since they happen after the page is finished loading. 708 // load, since they happen after the page is finished loading.
707 if (unsafe_resources[0].threat_type == 709 if (unsafe_resources[0].threat_type ==
708 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) { 710 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) {
709 return false; 711 return false;
710 } 712 }
711 713
712 // Otherwise, check the threat type. 714 // Otherwise, check the threat type.
713 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; 715 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource;
714 } 716 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698