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

Side by Side Diff: content/public/browser/browser_context.h

Issue 12041078: Clear the clipboard closing Incognito window (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved incogito marker to BrowserContext Created 7 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
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_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // that the ResourceContext is ready. 87 // that the ResourceContext is ready.
88 static void EnsureResourceContextInitialized(BrowserContext* browser_context); 88 static void EnsureResourceContextInitialized(BrowserContext* browser_context);
89 89
90 // Tells the HTML5 objects on this context to persist their session state 90 // Tells the HTML5 objects on this context to persist their session state
91 // across the next restart. 91 // across the next restart.
92 static void SaveSessionState(BrowserContext* browser_context); 92 static void SaveSessionState(BrowserContext* browser_context);
93 93
94 // Tells the HTML5 objects on this context to purge any uneeded memory. 94 // Tells the HTML5 objects on this context to purge any uneeded memory.
95 static void PurgeMemory(BrowserContext* browser_context); 95 static void PurgeMemory(BrowserContext* browser_context);
96 96
97 // We want to add a special flag stored in OS clipboard in order to delete
98 // this entry upon OffTheRecord context destruction.
99 // Returns a Clipboard::SourceTag (pointer) if |context| is OffTheRecord
100 // context. Otherwise, NULL.
101 // If the clipboard contains that SourceTag at the time of |context|
102 // destruction it will be flushed.
jam 2013/02/07 21:52:17 nit: this comment is a bit verbose. can you shrink
vasilii 2013/02/08 09:27:36 If I include clipboard.h, apps/app_restore_service
jam 2013/02/08 22:26:21 i'm not familiar with gtk. you can ask erg
Elliot Glaysher 2013/02/09 00:22:21 The only thing I can think of is that you're doing
vasilii 2013/02/13 16:57:25 Done.
103 static void* GetMarkerForOffTheRecordContext(BrowserContext* context);
104
97 virtual ~BrowserContext(); 105 virtual ~BrowserContext();
98 106
99 // Returns the path of the directory where this context's data is stored. 107 // Returns the path of the directory where this context's data is stored.
100 virtual base::FilePath GetPath() = 0; 108 virtual base::FilePath GetPath() = 0;
101 109
102 // Return whether this context is incognito. Default is false. 110 // Return whether this context is incognito. Default is false.
103 // This doesn't belong here; http://crbug.com/89628 111 // This doesn't belong here; http://crbug.com/89628
104 virtual bool IsOffTheRecord() const = 0; 112 virtual bool IsOffTheRecord() const = 0;
105 113
106 // Returns the request context information associated with this context. Call 114 // Returns the request context information associated with this context. Call
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 struct hash<content::BrowserContext*> { 172 struct hash<content::BrowserContext*> {
165 std::size_t operator()(content::BrowserContext* const& p) const { 173 std::size_t operator()(content::BrowserContext* const& p) const {
166 return reinterpret_cast<std::size_t>(p); 174 return reinterpret_cast<std::size_t>(p);
167 } 175 }
168 }; 176 };
169 177
170 } // namespace BASE_HASH_NAMESPACE 178 } // namespace BASE_HASH_NAMESPACE
171 #endif 179 #endif
172 180
173 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 181 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698