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

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

Issue 9215005: Revert 117824 - Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 check->is_download = true; 1232 check->is_download = true;
1233 check->timeout_factory_.reset( 1233 check->timeout_factory_.reset(
1234 new base::WeakPtrFactory<SafeBrowsingService>(this)); 1234 new base::WeakPtrFactory<SafeBrowsingService>(this));
1235 checks_.insert(check); 1235 checks_.insert(check);
1236 1236
1237 safe_browsing_thread_->message_loop()->PostTask(FROM_HERE, task); 1237 safe_browsing_thread_->message_loop()->PostTask(FROM_HERE, task);
1238 1238
1239 MessageLoop::current()->PostDelayedTask(FROM_HERE, 1239 MessageLoop::current()->PostDelayedTask(FROM_HERE,
1240 base::Bind(&SafeBrowsingService::TimeoutCallback, 1240 base::Bind(&SafeBrowsingService::TimeoutCallback,
1241 check->timeout_factory_->GetWeakPtr(), check), 1241 check->timeout_factory_->GetWeakPtr(), check),
1242 base::TimeDelta::FromMilliseconds(timeout_ms)); 1242 timeout_ms);
1243 } 1243 }
1244 1244
1245 void SafeBrowsingService::UpdateWhitelist(const UnsafeResource& resource) { 1245 void SafeBrowsingService::UpdateWhitelist(const UnsafeResource& resource) {
1246 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1246 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1247 // Whitelist this domain and warning type for the given tab. 1247 // Whitelist this domain and warning type for the given tab.
1248 WhiteListedEntry entry; 1248 WhiteListedEntry entry;
1249 entry.render_process_host_id = resource.render_process_host_id; 1249 entry.render_process_host_id = resource.render_process_host_id;
1250 entry.render_view_id = resource.render_view_id; 1250 entry.render_view_id = resource.render_view_id;
1251 entry.domain = net::RegistryControlledDomainService::GetDomainAndRegistry( 1251 entry.domain = net::RegistryControlledDomainService::GetDomainAndRegistry(
1252 resource.url); 1252 resource.url);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 Stop(); 1350 Stop();
1351 1351
1352 if (csd_service_.get()) 1352 if (csd_service_.get())
1353 csd_service_->SetEnabledAndRefreshState(enable); 1353 csd_service_->SetEnabledAndRefreshState(enable);
1354 if (download_service_.get()) { 1354 if (download_service_.get()) {
1355 download_service_->SetEnabled( 1355 download_service_->SetEnabled(
1356 enable && !CommandLine::ForCurrentProcess()->HasSwitch( 1356 enable && !CommandLine::ForCurrentProcess()->HasSwitch(
1357 switches::kDisableImprovedDownloadProtection)); 1357 switches::kDisableImprovedDownloadProtection));
1358 } 1358 }
1359 } 1359 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service.cc ('k') | chrome/browser/service/service_process_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698