| OLD | NEW |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // Private constructor, use the static factory methods instead. This is | 60 // Private constructor, use the static factory methods instead. This is |
| 61 // expected to be called on the UI thread. | 61 // expected to be called on the UI thread. |
| 62 ChromeURLRequestContext(Profile* profile); | 62 ChromeURLRequestContext(Profile* profile); |
| 63 | 63 |
| 64 // Create a request context for media resources from a regular request | 64 // Create a request context for media resources from a regular request |
| 65 // context. This helper method is called from CreateOriginalForMedia and | 65 // context. This helper method is called from CreateOriginalForMedia and |
| 66 // CreateOffTheRecordForMedia. | 66 // CreateOffTheRecordForMedia. |
| 67 static ChromeURLRequestContext* CreateRequestContextForMedia(Profile* profile, | 67 static ChromeURLRequestContext* CreateRequestContextForMedia(Profile* profile, |
| 68 const FilePath& disk_cache_path); | 68 const FilePath& disk_cache_path, bool off_the_record); |
| 69 | 69 |
| 70 // NotificationObserver implementation. | 70 // NotificationObserver implementation. |
| 71 virtual void Observe(NotificationType type, | 71 virtual void Observe(NotificationType type, |
| 72 const NotificationSource& source, | 72 const NotificationSource& source, |
| 73 const NotificationDetails& details); | 73 const NotificationDetails& details); |
| 74 | 74 |
| 75 // Callback for when the accept language changes. | 75 // Callback for when the accept language changes. |
| 76 void OnAcceptLanguageChange(std::string accept_language); | 76 void OnAcceptLanguageChange(std::string accept_language); |
| 77 | 77 |
| 78 // Callback for when the cookie policy changes. | 78 // Callback for when the cookie policy changes. |
| 79 void OnCookiePolicyChange(net::CookiePolicy::Type type); | 79 void OnCookiePolicyChange(net::CookiePolicy::Type type); |
| 80 | 80 |
| 81 // Callback for when new extensions are loaded. | 81 // Callback for when new extensions are loaded. |
| 82 void OnNewExtensions(ExtensionPaths* new_paths); | 82 void OnNewExtensions(ExtensionPaths* new_paths); |
| 83 | 83 |
| 84 // Destructor. | 84 // Destructor. |
| 85 virtual ~ChromeURLRequestContext(); | 85 virtual ~ChromeURLRequestContext(); |
| 86 | 86 |
| 87 // Maps extension IDs to paths on disk. This is initialized in the | 87 // Maps extension IDs to paths on disk. This is initialized in the |
| 88 // construtor and updated when extensions changed. | 88 // construtor and updated when extensions changed. |
| 89 ExtensionPaths extension_paths_; | 89 ExtensionPaths extension_paths_; |
| 90 | 90 |
| 91 // Path to the directory user scripts are stored in. | 91 // Path to the directory user scripts are stored in. |
| 92 FilePath user_script_dir_path_; | 92 FilePath user_script_dir_path_; |
| 93 | 93 |
| 94 scoped_ptr<SQLitePersistentCookieStore> cookie_db_; | 94 scoped_ptr<SQLitePersistentCookieStore> cookie_db_; |
| 95 PrefService* prefs_; | 95 PrefService* prefs_; |
| 96 bool is_off_the_record_; | 96 bool is_off_the_record_; |
| 97 }; | 97 }; |
| OLD | NEW |