OLD | NEW |
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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/background/background_mode_manager.h" | 12 #include "chrome/browser/background/background_mode_manager.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/content_settings/cookie_settings.h" | 15 #include "chrome/browser/content_settings/cookie_settings.h" |
16 #include "chrome/browser/defaults.h" | 16 #include "chrome/browser/defaults.h" |
17 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | |
18 #include "chrome/browser/infobars/infobar_service.h" | 17 #include "chrome/browser/infobars/infobar_service.h" |
19 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
20 #include "chrome/browser/prefs/session_startup_pref.h" | 19 #include "chrome/browser/prefs/session_startup_pref.h" |
21 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/profiles/profile_impl.h" | 21 #include "chrome/browser/profiles/profile_impl.h" |
23 #include "chrome/browser/profiles/profile_manager.h" | 22 #include "chrome/browser/profiles/profile_manager.h" |
24 #include "chrome/browser/sessions/session_backend.h" | 23 #include "chrome/browser/sessions/session_backend.h" |
25 #include "chrome/browser/sessions/session_service_factory.h" | 24 #include "chrome/browser/sessions/session_service_factory.h" |
26 #include "chrome/browser/sessions/session_service_test_helper.h" | 25 #include "chrome/browser/sessions/session_service_test_helper.h" |
27 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
28 #include "chrome/browser/ui/browser_commands.h" | 27 #include "chrome/browser/ui/browser_commands.h" |
29 #include "chrome/browser/ui/browser_iterator.h" | 28 #include "chrome/browser/ui/browser_iterator.h" |
30 #include "chrome/browser/ui/browser_window.h" | 29 #include "chrome/browser/ui/browser_window.h" |
31 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 30 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
32 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 31 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
33 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
34 #include "chrome/common/content_settings.h" | 33 #include "chrome/common/content_settings.h" |
35 #include "chrome/common/pref_names.h" | 34 #include "chrome/common/pref_names.h" |
36 #include "chrome/common/url_constants.h" | 35 #include "chrome/common/url_constants.h" |
37 #include "chrome/test/base/in_process_browser_test.h" | 36 #include "chrome/test/base/in_process_browser_test.h" |
38 #include "chrome/test/base/ui_test_utils.h" | 37 #include "chrome/test/base/ui_test_utils.h" |
| 38 #include "components/infobars/core/confirm_infobar_delegate.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "content/public/common/url_constants.h" | 40 #include "content/public/common/url_constants.h" |
41 #include "content/public/test/browser_test_utils.h" | 41 #include "content/public/test/browser_test_utils.h" |
42 #include "net/base/net_util.h" | 42 #include "net/base/net_util.h" |
43 #include "net/base/upload_bytes_element_reader.h" | 43 #include "net/base/upload_bytes_element_reader.h" |
44 #include "net/base/upload_data_stream.h" | 44 #include "net/base/upload_data_stream.h" |
45 #include "net/url_request/url_request.h" | 45 #include "net/url_request/url_request.h" |
46 #include "net/url_request/url_request_filter.h" | 46 #include "net/url_request/url_request_filter.h" |
47 #include "net/url_request/url_request_test_job.h" | 47 #include "net/url_request/url_request_test_job.h" |
48 | 48 |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 CookieSettings::Factory::GetForProfile(new_browser->profile())-> | 838 CookieSettings::Factory::GetForProfile(new_browser->profile())-> |
839 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); | 839 SetDefaultCookieSetting(CONTENT_SETTING_SESSION_ONLY); |
840 // ... even if background mode is active. | 840 // ... even if background mode is active. |
841 EnableBackgroundMode(); | 841 EnableBackgroundMode(); |
842 new_browser = QuitBrowserAndRestore(new_browser, true); | 842 new_browser = QuitBrowserAndRestore(new_browser, true); |
843 StoreDataWithPage(new_browser, "cookies.html"); | 843 StoreDataWithPage(new_browser, "cookies.html"); |
844 DisableBackgroundMode(); | 844 DisableBackgroundMode(); |
845 new_browser = QuitBrowserAndRestore(new_browser, true); | 845 new_browser = QuitBrowserAndRestore(new_browser, true); |
846 StoreDataWithPage(new_browser, "cookies.html"); | 846 StoreDataWithPage(new_browser, "cookies.html"); |
847 } | 847 } |
OLD | NEW |