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

Side by Side Diff: chrome/browser/in_process_webkit/webkit_context.h

Issue 258010: Reverting 27759. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_
6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ 6 #define CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 11
12 class DOMStorageContext; 12 class DOMStorageContext;
13 class WebKitThread;
13 14
14 // There's one WebKitContext per profile. Various DispatcherHost classes 15 // There's one WebKitContext per profile. Various DispatcherHost classes
15 // have a pointer to the Context to store shared state. 16 // have a pointer to the Context to store shared state.
16 class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> { 17 class WebKitContext : public base::RefCountedThreadSafe<WebKitContext> {
17 public: 18 public:
18 WebKitContext(const FilePath& data_path, bool is_incognito); 19 WebKitContext(const FilePath& data_path, bool is_incognito);
19 20
20 const FilePath& data_path() const { return data_path_; } 21 const FilePath& data_path() const { return data_path_; }
21 bool is_incognito() const { return is_incognito_; } 22 bool is_incognito() const { return is_incognito_; }
22 23 DOMStorageContext* dom_storage_context() {
23 // Initialized lazily. Pointer is valid for the lifetime of this instance. 24 return dom_storage_context_.get();
24 DOMStorageContext* GetDOMStorageContext(); 25 }
25 26
26 private: 27 private:
27 friend class base::RefCountedThreadSafe<WebKitContext>; 28 friend class base::RefCountedThreadSafe<WebKitContext>;
28 ~WebKitContext(); 29 ~WebKitContext();
29 30
30 // Copies of profile data that can be accessed on any thread. 31 // Copies of profile data that can be accessed on any thread.
31 const FilePath data_path_; 32 const FilePath data_path_;
32 const bool is_incognito_; 33 const bool is_incognito_;
33 34
34 // The state for DOM Storage.
35 scoped_ptr<DOMStorageContext> dom_storage_context_; 35 scoped_ptr<DOMStorageContext> dom_storage_context_;
36 36
37 DISALLOW_IMPLICIT_CONSTRUCTORS(WebKitContext); 37 DISALLOW_IMPLICIT_CONSTRUCTORS(WebKitContext);
38 }; 38 };
39 39
40 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ 40 #endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/in_process_webkit/storage_namespace.cc ('k') | chrome/browser/in_process_webkit/webkit_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698