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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.h

Issue 19747: URLRequestContext and disk cache for media files (Closed)
Patch Set: signed and unsigned... Created 11 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "chrome/common/net/cookie_monster_sqlite.h" 6 #include "chrome/common/net/cookie_monster_sqlite.h"
7 #include "chrome/common/notification_observer.h" 7 #include "chrome/common/notification_observer.h"
8 #include "chrome/common/pref_service.h" 8 #include "chrome/common/pref_service.h"
9 #include "net/url_request/url_request_context.h" 9 #include "net/url_request/url_request_context.h"
10 10
(...skipping 10 matching lines...) Expand all
21 public NotificationObserver { 21 public NotificationObserver {
22 public: 22 public:
23 typedef std::map<std::string, FilePath> ExtensionPaths; 23 typedef std::map<std::string, FilePath> ExtensionPaths;
24 24
25 // Create an instance for use with an 'original' (non-OTR) profile. This is 25 // Create an instance for use with an 'original' (non-OTR) profile. This is
26 // expected to get called on the UI thread. 26 // expected to get called on the UI thread.
27 static ChromeURLRequestContext* CreateOriginal( 27 static ChromeURLRequestContext* CreateOriginal(
28 Profile* profile, const FilePath& cookie_store_path, 28 Profile* profile, const FilePath& cookie_store_path,
29 const FilePath& disk_cache_path); 29 const FilePath& disk_cache_path);
30 30
31 // Create an instance for an original profile for media. This is expected to
32 // get called on UI thread. This method takes a profile and reuses the
33 // 'original' URLRequestContext for common files.
34 static ChromeURLRequestContext* CreateOriginalForMedia(Profile *profile,
35 const FilePath& disk_cache_path);
36
31 // Create an instance for use with an OTR profile. This is expected to get 37 // Create an instance for use with an OTR profile. This is expected to get
32 // called on the UI thread. 38 // called on the UI thread.
33 static ChromeURLRequestContext* CreateOffTheRecord(Profile* profile); 39 static ChromeURLRequestContext* CreateOffTheRecord(Profile* profile);
34 40
41 // Create an instance of request context for OTR profile for media resources.
42 static ChromeURLRequestContext* CreateOffTheRecordForMedia(Profile* profile,
43 const FilePath& disk_cache_path);
44
35 // Clean up UI thread resources. This is expected to get called on the UI 45 // Clean up UI thread resources. This is expected to get called on the UI
36 // thread before the instance is deleted on the IO thread. 46 // thread before the instance is deleted on the IO thread.
37 void CleanupOnUIThread(); 47 void CleanupOnUIThread();
38 48
39 // Gets the path to the directory for the specified extension. 49 // Gets the path to the directory for the specified extension.
40 FilePath GetPathForExtension(const std::string& id); 50 FilePath GetPathForExtension(const std::string& id);
41 51
42 // Gets the path to the directory user scripts are stored in. 52 // Gets the path to the directory user scripts are stored in.
43 FilePath user_script_dir_path() const { 53 FilePath user_script_dir_path() const {
44 return user_script_dir_path_; 54 return user_script_dir_path_;
(...skipping 27 matching lines...) Expand all
72 // construtor and updated when extensions changed. 82 // construtor and updated when extensions changed.
73 ExtensionPaths extension_paths_; 83 ExtensionPaths extension_paths_;
74 84
75 // Path to the directory user scripts are stored in. 85 // Path to the directory user scripts are stored in.
76 FilePath user_script_dir_path_; 86 FilePath user_script_dir_path_;
77 87
78 scoped_ptr<SQLitePersistentCookieStore> cookie_db_; 88 scoped_ptr<SQLitePersistentCookieStore> cookie_db_;
79 PrefService* prefs_; 89 PrefService* prefs_;
80 bool is_off_the_record_; 90 bool is_off_the_record_;
81 }; 91 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698