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

Unified Diff: chrome/browser/safe_browsing/threat_details.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/threat_details.h ('k') | chrome/browser/safe_browsing/threat_details_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/threat_details.cc
diff --git a/chrome/browser/safe_browsing/threat_details.cc b/chrome/browser/safe_browsing/threat_details.cc
index f72f6d5ddfd6c2229b8e2700415db70b4222a3a8..aa361e3fba36e2fb6dd987ad23063b6ed76f0063 100644
--- a/chrome/browser/safe_browsing/threat_details.cc
+++ b/chrome/browser/safe_browsing/threat_details.cc
@@ -22,11 +22,12 @@
using content::BrowserThread;
using content::NavigationEntry;
using content::WebContents;
-using safe_browsing::ClientSafeBrowsingReportRequest;
// Keep in sync with KMaxNodes in renderer/safe_browsing/threat_dom_details
static const uint32 kMaxDomNodes = 500;
+namespace safe_browsing {
+
// static
ThreatDetailsFactory* ThreatDetails::factory_ = NULL;
@@ -129,7 +130,7 @@ bool ThreatDetails::IsReportableUrl(const GURL& url) const {
//
ClientSafeBrowsingReportRequest::Resource* ThreatDetails::FindOrCreateResource(
const GURL& url) {
- safe_browsing::ResourceMap::iterator it = resources_.find(url.spec());
+ ResourceMap::iterator it = resources_.find(url.spec());
if (it != resources_.end())
return it->second.get();
@@ -277,7 +278,7 @@ void ThreatDetails::FinishCollection(bool did_proceed, int num_visit) {
did_proceed_ = did_proceed;
num_visits_ = num_visit;
std::vector<GURL> urls;
- for (safe_browsing::ResourceMap::const_iterator it = resources_.begin();
+ for (ResourceMap::const_iterator it = resources_.begin();
it != resources_.end(); ++it) {
urls.push_back(GURL(it->first));
}
@@ -287,7 +288,7 @@ void ThreatDetails::FinishCollection(bool did_proceed, int num_visit) {
void ThreatDetails::OnRedirectionCollectionReady() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- const std::vector<safe_browsing::RedirectChain>& redirects =
+ const std::vector<RedirectChain>& redirects =
redirects_collector_->GetCollectedUrls();
for (size_t i = 0; i < redirects.size(); ++i)
@@ -309,7 +310,7 @@ void ThreatDetails::AddRedirectUrlList(const std::vector<GURL>& urls) {
void ThreatDetails::OnCacheCollectionReady() {
DVLOG(1) << "OnCacheCollectionReady.";
// Add all the urls in our |resources_| maps to the |report_| protocol buffer.
- for (safe_browsing::ResourceMap::const_iterator it = resources_.begin();
+ for (ResourceMap::const_iterator it = resources_.begin();
it != resources_.end(); ++it) {
ClientSafeBrowsingReportRequest::Resource* pb_resource =
report_->add_resources();
@@ -339,3 +340,5 @@ void ThreatDetails::OnCacheCollectionReady() {
}
ui_manager_->SendSerializedThreatDetails(serialized);
}
+
+} // namespace safe_browsing
« no previous file with comments | « chrome/browser/safe_browsing/threat_details.h ('k') | chrome/browser/safe_browsing/threat_details_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698