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/chrome_quota_permission_context.h" | 5 #include "chrome/browser/chrome_quota_permission_context.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 } | 206 } |
207 | 207 |
208 RequestQuotaInfoBarDelegate::~RequestQuotaInfoBarDelegate() { | 208 RequestQuotaInfoBarDelegate::~RequestQuotaInfoBarDelegate() { |
209 if (!callback_.is_null()) { | 209 if (!callback_.is_null()) { |
210 context_->DispatchCallbackOnIOThread( | 210 context_->DispatchCallbackOnIOThread( |
211 callback_, | 211 callback_, |
212 content::QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED); | 212 content::QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED); |
213 } | 213 } |
214 } | 214 } |
215 | 215 |
216 bool RequestQuotaInfoBarDelegate::ShouldExpireInternal( | 216 bool RequestQuotaInfoBarDelegate::ShouldExpireInternal( |
meacer
2014/05/30 17:44:21
You should be able to remove this override altoget
Nikhil
2014/06/03 06:36:02
Done.
| |
217 const NavigationDetails& details) const { | 217 const NavigationDetails& details) const { |
218 return false; | 218 return ConfirmInfoBarDelegate::ShouldExpireInternal(details); |
219 } | 219 } |
220 | 220 |
221 base::string16 RequestQuotaInfoBarDelegate::GetMessageText() const { | 221 base::string16 RequestQuotaInfoBarDelegate::GetMessageText() const { |
222 // If the site requested larger quota than this threshold, show a different | 222 // If the site requested larger quota than this threshold, show a different |
223 // message to the user. | 223 // message to the user. |
224 return l10n_util::GetStringFUTF16( | 224 return l10n_util::GetStringFUTF16( |
225 (requested_quota_ > kRequestLargeQuotaThreshold ? | 225 (requested_quota_ > kRequestLargeQuotaThreshold ? |
226 IDS_REQUEST_LARGE_QUOTA_INFOBAR_QUESTION : | 226 IDS_REQUEST_LARGE_QUOTA_INFOBAR_QUESTION : |
227 IDS_REQUEST_QUOTA_INFOBAR_QUESTION), | 227 IDS_REQUEST_QUOTA_INFOBAR_QUESTION), |
228 net::FormatUrl(origin_url_, display_languages_)); | 228 net::FormatUrl(origin_url_, display_languages_)); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
319 content::BrowserThread::IO, FROM_HERE, | 319 content::BrowserThread::IO, FROM_HERE, |
320 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, | 320 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, |
321 this, callback, response)); | 321 this, callback, response)); |
322 return; | 322 return; |
323 } | 323 } |
324 | 324 |
325 callback.Run(response); | 325 callback.Run(response); |
326 } | 326 } |
327 | 327 |
328 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} | 328 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} |
OLD | NEW |