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/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 callback_(callback) {} | 53 callback_(callback) {} |
54 | 54 |
55 private: | 55 private: |
56 virtual ~RequestQuotaInfoBarDelegate() { | 56 virtual ~RequestQuotaInfoBarDelegate() { |
57 if (!callback_.is_null()) | 57 if (!callback_.is_null()) |
58 context_->DispatchCallbackOnIOThread( | 58 context_->DispatchCallbackOnIOThread( |
59 callback_, | 59 callback_, |
60 QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED); | 60 QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED); |
61 } | 61 } |
62 | 62 |
63 virtual bool ShouldExpire( | 63 virtual bool ShouldExpireInternal( |
64 const content::LoadCommittedDetails& details) | 64 const content::LoadCommittedDetails& details) |
65 const OVERRIDE { | 65 const OVERRIDE { |
66 return false; | 66 return false; |
67 } | 67 } |
68 | 68 |
69 virtual string16 GetMessageText() const OVERRIDE; | 69 virtual string16 GetMessageText() const OVERRIDE; |
70 virtual bool Accept() OVERRIDE; | 70 virtual bool Accept() OVERRIDE; |
71 virtual bool Cancel() OVERRIDE; | 71 virtual bool Cancel() OVERRIDE; |
72 | 72 |
73 scoped_refptr<ChromeQuotaPermissionContext> context_; | 73 scoped_refptr<ChromeQuotaPermissionContext> context_; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 BrowserThread::IO, FROM_HERE, | 164 BrowserThread::IO, FROM_HERE, |
165 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, | 165 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, |
166 this, callback, response)); | 166 this, callback, response)); |
167 return; | 167 return; |
168 } | 168 } |
169 | 169 |
170 callback.Run(response); | 170 callback.Run(response); |
171 } | 171 } |
172 | 172 |
173 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} | 173 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} |
OLD | NEW |