| OLD | NEW |
| 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 #include "chrome_frame/urlmon_url_request.h" | 5 #include "chrome_frame/urlmon_url_request.h" |
| 6 | 6 |
| 7 #include <wininet.h> | 7 #include <wininet.h> |
| 8 #include <urlmon.h> | 8 #include <urlmon.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 StopAll(); | 1241 StopAll(); |
| 1242 } | 1242 } |
| 1243 | 1243 |
| 1244 void UrlmonUrlRequestManager::AddPrivacyDataForUrl( | 1244 void UrlmonUrlRequestManager::AddPrivacyDataForUrl( |
| 1245 const std::string& url, const std::string& policy_ref, | 1245 const std::string& url, const std::string& policy_ref, |
| 1246 int32 flags) { | 1246 int32 flags) { |
| 1247 DCHECK(!url.empty()); | 1247 DCHECK(!url.empty()); |
| 1248 | 1248 |
| 1249 bool fire_privacy_event = false; | 1249 bool fire_privacy_event = false; |
| 1250 | 1250 |
| 1251 if (privacy_info_.privacy_records.size() == 0) | 1251 if (privacy_info_.privacy_records.empty()) |
| 1252 flags |= PRIVACY_URLISTOPLEVEL; | 1252 flags |= PRIVACY_URLISTOPLEVEL; |
| 1253 | 1253 |
| 1254 if (!privacy_info_.privacy_impacted) { | 1254 if (!privacy_info_.privacy_impacted) { |
| 1255 if (flags & (COOKIEACTION_ACCEPT | COOKIEACTION_REJECT | | 1255 if (flags & (COOKIEACTION_ACCEPT | COOKIEACTION_REJECT | |
| 1256 COOKIEACTION_DOWNGRADE)) { | 1256 COOKIEACTION_DOWNGRADE)) { |
| 1257 privacy_info_.privacy_impacted = true; | 1257 privacy_info_.privacy_impacted = true; |
| 1258 fire_privacy_event = true; | 1258 fire_privacy_event = true; |
| 1259 } | 1259 } |
| 1260 } | 1260 } |
| 1261 | 1261 |
| 1262 PrivacyInfo::PrivacyEntry& privacy_entry = | 1262 PrivacyInfo::PrivacyEntry& privacy_entry = |
| 1263 privacy_info_.privacy_records[UTF8ToWide(url)]; | 1263 privacy_info_.privacy_records[UTF8ToWide(url)]; |
| 1264 | 1264 |
| 1265 privacy_entry.flags |= flags; | 1265 privacy_entry.flags |= flags; |
| 1266 privacy_entry.policy_ref = UTF8ToWide(policy_ref); | 1266 privacy_entry.policy_ref = UTF8ToWide(policy_ref); |
| 1267 | 1267 |
| 1268 if (fire_privacy_event && IsWindow(notification_window_)) { | 1268 if (fire_privacy_event && IsWindow(notification_window_)) { |
| 1269 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, | 1269 PostMessage(notification_window_, WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, 1, |
| 1270 0); | 1270 0); |
| 1271 } | 1271 } |
| 1272 } | 1272 } |
| OLD | NEW |