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

Side by Side Diff: chrome/browser/extensions/extension_special_storage_policy.cc

Issue 168953002: Cleanup: Move kChromeDevToolsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extension_special_storage_policy.h" 5 #include "chrome/browser/extensions/extension_special_storage_policy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 25 matching lines...) Expand all
36 if (origin.SchemeIs(extensions::kExtensionScheme)) 36 if (origin.SchemeIs(extensions::kExtensionScheme))
37 return true; 37 return true;
38 base::AutoLock locker(lock_); 38 base::AutoLock locker(lock_);
39 return protected_apps_.Contains(origin); 39 return protected_apps_.Contains(origin);
40 } 40 }
41 41
42 bool ExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { 42 bool ExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
43 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUnlimitedStorage)) 43 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUnlimitedStorage))
44 return true; 44 return true;
45 45
46 if (origin.SchemeIs(chrome::kChromeDevToolsScheme) && 46 if (origin.SchemeIs(content::kChromeDevToolsScheme) &&
47 origin.host() == chrome::kChromeUIDevToolsHost) 47 origin.host() == chrome::kChromeUIDevToolsHost)
48 return true; 48 return true;
49 49
50 base::AutoLock locker(lock_); 50 base::AutoLock locker(lock_);
51 return unlimited_extensions_.Contains(origin); 51 return unlimited_extensions_.Contains(origin);
52 } 52 }
53 53
54 bool ExtensionSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { 54 bool ExtensionSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
55 if (cookie_settings_.get() == NULL) 55 if (cookie_settings_.get() == NULL)
56 return false; 56 return false;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { 273 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() {
274 ClearCache(); 274 ClearCache();
275 extensions_.Clear(); 275 extensions_.Clear();
276 } 276 }
277 277
278 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() { 278 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() {
279 STLDeleteValues(&cached_results_); 279 STLDeleteValues(&cached_results_);
280 cached_results_.clear(); 280 cached_results_.clear();
281 } 281 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698