Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/geolocation/geolocation_permission_context.h" | 5 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
| 6 | 6 |
| 7 #include <functional> | 7 #include <functional> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 | 198 |
| 199 ContentSetting content_setting = | 199 ContentSetting content_setting = |
| 200 profile_->GetHostContentSettingsMap()->GetContentSetting( | 200 profile_->GetHostContentSettingsMap()->GetContentSetting( |
| 201 requesting_frame, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION, | 201 requesting_frame, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION, |
| 202 std::string()); | 202 std::string()); |
| 203 switch (content_setting) { | 203 switch (content_setting) { |
| 204 case CONTENT_SETTING_BLOCK: | 204 case CONTENT_SETTING_BLOCK: |
| 205 PermissionDecided(id, requesting_frame, embedder, callback, false); | 205 PermissionDecided(id, requesting_frame, embedder, callback, false); |
| 206 break; | 206 break; |
| 207 case CONTENT_SETTING_ALLOW: | 207 case CONTENT_SETTING_ALLOW: |
| 208 profile_->GetHostContentSettingsMap()->UpdateLastUsage( | |
|
Michael van Ouwerkerk
2014/06/26 10:26:39
Why is this only called for this one case? If you
Daniel Nishi
2014/06/26 20:31:25
NotifyPermissionSet doesn't have a reference to |e
| |
| 209 requesting_frame, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION); | |
| 208 PermissionDecided(id, requesting_frame, embedder, callback, true); | 210 PermissionDecided(id, requesting_frame, embedder, callback, true); |
| 209 break; | 211 break; |
| 210 default: | 212 default: |
| 211 if (PermissionBubbleManager::Enabled()) { | 213 if (PermissionBubbleManager::Enabled()) { |
| 212 PermissionBubbleManager* mgr = | 214 PermissionBubbleManager* mgr = |
| 213 PermissionBubbleManager::FromWebContents(web_contents); | 215 PermissionBubbleManager::FromWebContents(web_contents); |
| 214 if (mgr) { | 216 if (mgr) { |
| 215 scoped_ptr<GeolocationPermissionRequest> request_ptr( | 217 scoped_ptr<GeolocationPermissionRequest> request_ptr( |
| 216 new GeolocationPermissionRequest( | 218 new GeolocationPermissionRequest( |
| 217 this, id, requesting_frame, user_gesture, callback, | 219 this, id, requesting_frame, user_gesture, callback, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 if (cancelling != NULL && web_contents != NULL && | 322 if (cancelling != NULL && web_contents != NULL && |
| 321 PermissionBubbleManager::FromWebContents(web_contents) != NULL) { | 323 PermissionBubbleManager::FromWebContents(web_contents) != NULL) { |
| 322 PermissionBubbleManager::FromWebContents(web_contents)-> | 324 PermissionBubbleManager::FromWebContents(web_contents)-> |
| 323 CancelRequest(cancelling); | 325 CancelRequest(cancelling); |
| 324 } | 326 } |
| 325 return; | 327 return; |
| 326 } | 328 } |
| 327 | 329 |
| 328 QueueController()->CancelInfoBarRequest(id); | 330 QueueController()->CancelInfoBarRequest(id); |
| 329 } | 331 } |
| OLD | NEW |