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

Side by Side Diff: chrome/browser/extensions/settings/settings_frontend.cc

Issue 10649003: Move each permission classes to its own files in extensions/permissions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase on HEAD Created 8 years, 6 months 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/extensions/settings/settings_frontend.h" 5 #include "chrome/browser/extensions/settings/settings_frontend.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "chrome/browser/extensions/extension_event_names.h" 10 #include "chrome/browser/extensions/extension_event_names.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return; 296 return;
297 } 297 }
298 298
299 // A neat way to implement unlimited storage; if the extension has the 299 // A neat way to implement unlimited storage; if the extension has the
300 // unlimited storage permission, force through all calls to Set() (in the 300 // unlimited storage permission, force through all calls to Set() (in the
301 // same way that writes from sync ignore quota). 301 // same way that writes from sync ignore quota).
302 // But only if it's local storage (bad stuff would happen if sync'ed 302 // But only if it's local storage (bad stuff would happen if sync'ed
303 // storage is allowed to be unlimited). 303 // storage is allowed to be unlimited).
304 bool is_unlimited = 304 bool is_unlimited =
305 settings_namespace == settings_namespace::LOCAL && 305 settings_namespace == settings_namespace::LOCAL &&
306 extension->HasAPIPermission(ExtensionAPIPermission::kUnlimitedStorage); 306 extension->HasAPIPermission(APIPermission::kUnlimitedStorage);
307 307
308 scoped_refptr<BackendWrapper> backend; 308 scoped_refptr<BackendWrapper> backend;
309 if (extension->is_app()) { 309 if (extension->is_app()) {
310 backend = backends_[settings_namespace].app; 310 backend = backends_[settings_namespace].app;
311 } else { 311 } else {
312 backend = backends_[settings_namespace].extension; 312 backend = backends_[settings_namespace].extension;
313 } 313 }
314 314
315 backend->RunWithBackend( 315 backend->RunWithBackend(
316 base::Bind( 316 base::Bind(
(...skipping 19 matching lines...) Expand all
336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
337 return observers_; 337 return observers_;
338 } 338 }
339 339
340 // BackendWrappers 340 // BackendWrappers
341 341
342 SettingsFrontend::BackendWrappers::BackendWrappers() {} 342 SettingsFrontend::BackendWrappers::BackendWrappers() {}
343 SettingsFrontend::BackendWrappers::~BackendWrappers() {} 343 SettingsFrontend::BackendWrappers::~BackendWrappers() {}
344 344
345 } // namespace extensions 345 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698