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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 PrefService* local_state = g_browser_process->local_state(); 662 PrefService* local_state = g_browser_process->local_state();
663 std::string client_key, wrapped_key; 663 std::string client_key, wrapped_key;
664 if (local_state) { 664 if (local_state) {
665 client_key = 665 client_key =
666 local_state->GetString(prefs::kSafeBrowsingClientKey); 666 local_state->GetString(prefs::kSafeBrowsingClientKey);
667 wrapped_key = 667 wrapped_key =
668 local_state->GetString(prefs::kSafeBrowsingWrappedKey); 668 local_state->GetString(prefs::kSafeBrowsingWrappedKey);
669 } 669 }
670 670
671 // We will issue network fetches using the default profile's request context. 671 // We will issue network fetches using the default profile's request context.
672 scoped_refptr<URLRequestContextGetter> request_context_getter = 672 scoped_refptr<URLRequestContextGetter> request_context_getter(
673 GetDefaultProfile()->GetRequestContext(); 673 GetDefaultProfile()->GetRequestContext());
674 674
675 BrowserThread::PostTask( 675 BrowserThread::PostTask(
676 BrowserThread::IO, FROM_HERE, 676 BrowserThread::IO, FROM_HERE,
677 NewRunnableMethod( 677 NewRunnableMethod(
678 this, &SafeBrowsingService::OnIOInitialize, client_key, wrapped_key, 678 this, &SafeBrowsingService::OnIOInitialize, client_key, wrapped_key,
679 request_context_getter)); 679 request_context_getter));
680 } 680 }
681 681
682 void SafeBrowsingService::OnCloseDatabase() { 682 void SafeBrowsingService::OnCloseDatabase() {
683 DCHECK_EQ(MessageLoop::current(), safe_browsing_thread_->message_loop()); 683 DCHECK_EQ(MessageLoop::current(), safe_browsing_thread_->message_loop());
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 if (!enabled_) 825 if (!enabled_)
826 return; 826 return;
827 827
828 DVLOG(1) << "ReportSafeBrowsingHit: " << malicious_url << " " << page_url 828 DVLOG(1) << "ReportSafeBrowsingHit: " << malicious_url << " " << page_url
829 << " " << referrer_url << " " << is_subresource << " " 829 << " " << referrer_url << " " << is_subresource << " "
830 << threat_type; 830 << threat_type;
831 protocol_manager_->ReportSafeBrowsingHit(malicious_url, page_url, 831 protocol_manager_->ReportSafeBrowsingHit(malicious_url, page_url,
832 referrer_url, is_subresource, 832 referrer_url, is_subresource,
833 threat_type); 833 threat_type);
834 } 834 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/bloom_filter_unittest.cc ('k') | chrome/browser/safe_browsing/safe_browsing_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698