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

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/win 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(ConfirmInfoBarDelegate::CreateInfoBar(
192 infobar_service,
192 scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate( 193 scoped_ptr<ConfirmInfoBarDelegate>(new RequestQuotaInfoBarDelegate(
193 context, origin_url, requested_quota, display_languages, callback)))); 194 context, origin_url, requested_quota, display_languages, callback))));
194 } 195 }
195 196
196 RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate( 197 RequestQuotaInfoBarDelegate::RequestQuotaInfoBarDelegate(
197 ChromeQuotaPermissionContext* context, 198 ChromeQuotaPermissionContext* context,
198 const GURL& origin_url, 199 const GURL& origin_url,
199 int64 requested_quota, 200 int64 requested_quota,
200 const std::string& display_languages, 201 const std::string& display_languages,
201 const content::QuotaPermissionContext::PermissionCallback& callback) 202 const content::QuotaPermissionContext::PermissionCallback& callback)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 content::BrowserThread::IO, FROM_HERE, 321 content::BrowserThread::IO, FROM_HERE,
321 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread, 322 base::Bind(&ChromeQuotaPermissionContext::DispatchCallbackOnIOThread,
322 this, callback, response)); 323 this, callback, response));
323 return; 324 return;
324 } 325 }
325 326
326 callback.Run(response); 327 callback.Run(response);
327 } 328 }
328 329
329 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {} 330 ChromeQuotaPermissionContext::~ChromeQuotaPermissionContext() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698