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

Side by Side Diff: chrome/browser/safe_browsing/client_side_detection_host.h

Issue 8573018: Convert to base::Callback in safe_browsing client-side-detection code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Don't call Run() on null callbacks. Created 9 years 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
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 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // variable. This information will be passed on to the feature extractor. 114 // variable. This information will be passed on to the feature extractor.
115 scoped_ptr<BrowseInfo> browse_info_; 115 scoped_ptr<BrowseInfo> browse_info_;
116 // Redirect chain that leads to the first page of the current host. We keep 116 // Redirect chain that leads to the first page of the current host. We keep
117 // track of this for browse_info_. 117 // track of this for browse_info_.
118 std::vector<GURL> cur_host_redirects_; 118 std::vector<GURL> cur_host_redirects_;
119 // Current host, used to help determine cur_host_redirects_. 119 // Current host, used to help determine cur_host_redirects_.
120 std::string cur_host_; 120 std::string cur_host_;
121 // Handles registering notifications with the NotificationService. 121 // Handles registering notifications with the NotificationService.
122 content::NotificationRegistrar registrar_; 122 content::NotificationRegistrar registrar_;
123 123
124 base::ScopedCallbackFactory<ClientSideDetectionHost> cb_factory_; 124 base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_;
125 125
126 // Unique page ID of the most recent unsafe site that was loaded in this tab 126 // Unique page ID of the most recent unsafe site that was loaded in this tab
127 // as well as the UnsafeResource. 127 // as well as the UnsafeResource.
128 int unsafe_unique_page_id_; 128 int unsafe_unique_page_id_;
129 scoped_ptr<SafeBrowsingService::UnsafeResource> unsafe_resource_; 129 scoped_ptr<SafeBrowsingService::UnsafeResource> unsafe_resource_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); 131 DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost);
132 }; 132 };
133 133
134 } // namespace safe_browsing 134 } // namespace safe_browsing
135 135
136 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_ 136 #endif // CHROME_BROWSER_SAFE_BROWSING_CLIENT_SIDE_DETECTION_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698