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 <algorithm> | 5 #include <algorithm> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.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/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/extensions/extension_browsertest.h" | 13 #include "chrome/browser/extensions/extension_browsertest.h" |
14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
15 #include "chrome/browser/extensions/launch_util.h" | 15 #include "chrome/browser/extensions/launch_util.h" |
16 #include "chrome/browser/first_run/first_run.h" | 16 #include "chrome/browser/first_run/first_run.h" |
17 #include "chrome/browser/infobars/infobar_service.h" | 17 #include "chrome/browser/infobars/infobar_service.h" |
18 #include "chrome/browser/prefs/session_startup_pref.h" | 18 #include "chrome/browser/prefs/session_startup_pref.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/profiles/profile_impl.h" | 20 #include "chrome/browser/profiles/profile_impl.h" |
21 #include "chrome/browser/profiles/profile_manager.h" | 21 #include "chrome/browser/profiles/profile_manager.h" |
22 #include "chrome/browser/sessions/session_restore.h" | 22 #include "chrome/browser/sessions/session_restore.h" |
23 #include "chrome/browser/signin/signin_promo.h" | 23 #include "chrome/browser/signin/signin_promo.h" |
24 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" | |
25 #include "chrome/browser/supervised_user/supervised_user_service.h" | |
26 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | |
27 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
28 #include "chrome/browser/ui/browser_commands.h" | 25 #include "chrome/browser/ui/browser_commands.h" |
29 #include "chrome/browser/ui/browser_finder.h" | 26 #include "chrome/browser/ui/browser_finder.h" |
30 #include "chrome/browser/ui/browser_iterator.h" | 27 #include "chrome/browser/ui/browser_iterator.h" |
31 #include "chrome/browser/ui/browser_list.h" | 28 #include "chrome/browser/ui/browser_list.h" |
32 #include "chrome/browser/ui/browser_list_observer.h" | 29 #include "chrome/browser/ui/browser_list_observer.h" |
33 #include "chrome/browser/ui/browser_window.h" | 30 #include "chrome/browser/ui/browser_window.h" |
34 #include "chrome/browser/ui/host_desktop.h" | 31 #include "chrome/browser/ui/host_desktop.h" |
35 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 32 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
36 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 33 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
(...skipping 19 matching lines...) Expand all Loading... |
56 #include "components/policy/core/common/mock_configuration_policy_provider.h" | 53 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
57 #include "components/policy/core/common/policy_map.h" | 54 #include "components/policy/core/common/policy_map.h" |
58 #include "components/policy/core/common/policy_types.h" | 55 #include "components/policy/core/common/policy_types.h" |
59 #include "policy/policy_constants.h" | 56 #include "policy/policy_constants.h" |
60 #include "testing/gmock/include/gmock/gmock.h" | 57 #include "testing/gmock/include/gmock/gmock.h" |
61 | 58 |
62 using testing::_; | 59 using testing::_; |
63 using testing::Return; | 60 using testing::Return; |
64 #endif // defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) | 61 #endif // defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) |
65 | 62 |
| 63 #if defined(ENABLE_MANAGED_USERS) |
| 64 #include "chrome/browser/supervised_user/supervised_user_navigation_observer.h" |
| 65 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 66 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| 67 #endif |
| 68 |
66 using extensions::Extension; | 69 using extensions::Extension; |
67 | 70 |
68 namespace { | 71 namespace { |
69 | 72 |
70 // Check that there are two browsers. Find the one that is not |browser|. | 73 // Check that there are two browsers. Find the one that is not |browser|. |
71 Browser* FindOneOtherBrowser(Browser* browser) { | 74 Browser* FindOneOtherBrowser(Browser* browser) { |
72 // There should only be one other browser. | 75 // There should only be one other browser. |
73 EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile(), | 76 EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile(), |
74 browser->host_desktop_type())); | 77 browser->host_desktop_type())); |
75 | 78 |
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 ASSERT_EQ(1, tab_strip->count()); | 1440 ASSERT_EQ(1, tab_strip->count()); |
1438 EXPECT_EQ("title1.html", | 1441 EXPECT_EQ("title1.html", |
1439 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1442 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1440 } | 1443 } |
1441 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1444 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
1442 | 1445 |
1443 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1446 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
1444 // defined(ENABLE_CONFIGURATION_POLICY) | 1447 // defined(ENABLE_CONFIGURATION_POLICY) |
1445 | 1448 |
1446 #endif // !defined(OS_CHROMEOS) | 1449 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |