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

Side by Side Diff: content/browser/indexed_db/indexed_db_context_impl.h

Issue 388583003: Indicate incognito in Service Worker and IndexedDB internals pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | content/browser/indexed_db/indexed_db_context_impl.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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 std::set<GURL>* set = GetOriginSet(); 96 std::set<GURL>* set = GetOriginSet();
97 return set->find(origin_url) != set->end(); 97 return set->find(origin_url) != set->end();
98 } 98 }
99 size_t GetConnectionCount(const GURL& origin_url); 99 size_t GetConnectionCount(const GURL& origin_url);
100 100
101 // For unit tests allow to override the |data_path_|. 101 // For unit tests allow to override the |data_path_|.
102 void set_data_path_for_testing(const base::FilePath& data_path) { 102 void set_data_path_for_testing(const base::FilePath& data_path) {
103 data_path_ = data_path; 103 data_path_ = data_path;
104 } 104 }
105 105
106 bool is_incognito() const { return data_path_.empty(); }
107
106 protected: 108 protected:
107 virtual ~IndexedDBContextImpl(); 109 virtual ~IndexedDBContextImpl();
108 110
109 private: 111 private:
110 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearLocalState); 112 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearLocalState);
111 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearSessionOnlyDatabases); 113 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ClearSessionOnlyDatabases);
112 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, SetForceKeepSessionState); 114 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, SetForceKeepSessionState);
113 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ForceCloseOpenDatabasesOnDelete); 115 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, ForceCloseOpenDatabasesOnDelete);
114 friend class IndexedDBQuotaClientTest; 116 friend class IndexedDBQuotaClientTest;
115 117
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 scoped_ptr<std::set<GURL> > origin_set_; 150 scoped_ptr<std::set<GURL> > origin_set_;
149 OriginToSizeMap origin_size_map_; 151 OriginToSizeMap origin_size_map_;
150 OriginToSizeMap space_available_map_; 152 OriginToSizeMap space_available_map_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); 154 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl);
153 }; 155 };
154 156
155 } // namespace content 157 } // namespace content
156 158
157 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ 159 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698