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

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

Issue 7619010: Session-only local storage cleared on exit. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Code review comments (tiny). Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/mock_extension_special_storage_policy.h" 5 #include "chrome/browser/extensions/mock_extension_special_storage_policy.h"
6 6
7 MockExtensionSpecialStoragePolicy::MockExtensionSpecialStoragePolicy() {} 7 MockExtensionSpecialStoragePolicy::MockExtensionSpecialStoragePolicy()
8 : ExtensionSpecialStoragePolicy(NULL) {}
9
8 MockExtensionSpecialStoragePolicy::~MockExtensionSpecialStoragePolicy() {} 10 MockExtensionSpecialStoragePolicy::~MockExtensionSpecialStoragePolicy() {}
9 11
10 bool MockExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { 12 bool MockExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) {
11 return protected_.find(origin) != protected_.end(); 13 return protected_.find(origin) != protected_.end();
12 } 14 }
13 15
14 bool MockExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) { 16 bool MockExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
15 return unlimited_.find(origin) != unlimited_.end(); 17 return unlimited_.find(origin) != unlimited_.end();
16 } 18 }
17 19
20 bool MockExtensionSpecialStoragePolicy::IsStorageSessionOnly(
21 const GURL& origin) {
22 return session_only_.find(origin) != session_only_.end();
23 }
24
18 bool MockExtensionSpecialStoragePolicy::IsFileHandler( 25 bool MockExtensionSpecialStoragePolicy::IsFileHandler(
19 const std::string& extension_id) { 26 const std::string& extension_id) {
20 return file_handlers_.find(extension_id) != file_handlers_.end(); 27 return file_handlers_.find(extension_id) != file_handlers_.end();
21 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/mock_extension_special_storage_policy.h ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698