Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: chrome/browser/chrome_quota_permission_context.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on Android Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 }; 181 };
182 182
183 // static 183 // static
184 void RequestQuotaInfoBarDelegate::Create( 184 void RequestQuotaInfoBarDelegate::Create(
185 InfoBarService* infobar_service, 185 InfoBarService* infobar_service,
186 ChromeQuotaPermissionContext* context, 186 ChromeQuotaPermissionContext* context,
187 const GURL& origin_url, 187 const GURL& origin_url,
188 int64 requested_quota, 188 int64 requested_quota,
189 const std::string& display_languages, 189 const std::string& display_languages,
190 const content::QuotaPermissionContext::PermissionCallback& callback) { 190 const content::QuotaPermissionContext::PermissionCallback& callback) {
191 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( 191 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
192 scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate( 192 scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate(
193 context, origin_url, requested_quota, display_languages, callback)))); 193 context, origin_url, requested_quota, display_languages, callback))));
194 } 194 }
195 195
196 RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate( 196 RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate(
197 ChromeQuotaPermissionContext* context, 197 ChromeQuotaPermissionContext* context,
198 const GURL& origin_url, 198 const GURL& origin_url,
199 int64 requested_quota, 199 int64 requested_quota,
200 const std::string& display_languages, 200 const std::string& display_languages,
201 const content::QuotaPermissionContext::PermissionCallback& callback) 201 const content::QuotaPermissionContext::PermissionCallback& callback)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 content::BrowserThread::IO, FROM_HERE, 320 content::BrowserThread::IO, FROM_HERE,
321 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, 321 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread,
322 this, callback, response)); 322 this, callback, response));
323 return; 323 return;
324 } 324 }
325 325
326 callback.Run(response); 326 callback.Run(response);
327 } 327 }
328 328
329 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} 329 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698