OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_android.h" | 5 #include "chrome/browser/geolocation/geolocation_permission_context_android.h" |
6 | 6 |
| 7 #include <utility> |
7 #include <vector> | 8 #include <vector> |
8 | 9 |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "chrome/browser/android/location_settings.h" | 11 #include "chrome/browser/android/location_settings.h" |
11 #include "chrome/browser/android/location_settings_impl.h" | 12 #include "chrome/browser/android/location_settings_impl.h" |
12 #include "chrome/browser/permissions/permission_request_id.h" | 13 #include "chrome/browser/permissions/permission_request_id.h" |
13 #include "chrome/browser/permissions/permission_update_infobar_delegate_android.
h" | 14 #include "chrome/browser/permissions/permission_update_infobar_delegate_android.
h" |
14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
16 #include "url/gurl.h" | 17 #include "url/gurl.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 71 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
71 ContentSetting new_setting = permissions_updated | 72 ContentSetting new_setting = permissions_updated |
72 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; | 73 ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; |
73 | 74 |
74 NotifyPermissionSet(id, requesting_frame_origin, embedding_origin, callback, | 75 NotifyPermissionSet(id, requesting_frame_origin, embedding_origin, callback, |
75 false /* persist */, new_setting); | 76 false /* persist */, new_setting); |
76 } | 77 } |
77 | 78 |
78 void GeolocationPermissionContextAndroid::SetLocationSettingsForTesting( | 79 void GeolocationPermissionContextAndroid::SetLocationSettingsForTesting( |
79 scoped_ptr<LocationSettings> settings) { | 80 scoped_ptr<LocationSettings> settings) { |
80 location_settings_ = settings.Pass(); | 81 location_settings_ = std::move(settings); |
81 } | 82 } |
OLD | NEW |