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" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 // Code that opens a new browser assumes we start with exactly one. | 116 // Code that opens a new browser assumes we start with exactly one. |
117 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), | 117 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile(), |
118 browser()->host_desktop_type())); | 118 browser()->host_desktop_type())); |
119 } | 119 } |
120 | 120 |
121 void SetAppLaunchPref(const std::string& app_id, | 121 void SetAppLaunchPref(const std::string& app_id, |
122 extensions::LaunchType launch_type) { | 122 extensions::LaunchType launch_type) { |
123 ExtensionService* service = extensions::ExtensionSystem::Get( | 123 ExtensionService* service = extensions::ExtensionSystem::Get( |
124 browser()->profile())->extension_service(); | 124 browser()->profile())->extension_service(); |
125 extensions::SetLaunchType(service->extension_prefs(), app_id, launch_type); | 125 extensions::SetLaunchType(service, app_id, launch_type); |
126 } | 126 } |
127 | 127 |
128 Browser* FindOneOtherBrowserForProfile(Profile* profile, | 128 Browser* FindOneOtherBrowserForProfile(Profile* profile, |
129 Browser* not_this_browser) { | 129 Browser* not_this_browser) { |
130 for (chrome::BrowserIterator it; !it.done(); it.Next()) { | 130 for (chrome::BrowserIterator it; !it.done(); it.Next()) { |
131 if (*it != not_this_browser && it->profile() == profile) | 131 if (*it != not_this_browser && it->profile() == profile) |
132 return *it; | 132 return *it; |
133 } | 133 } |
134 return NULL; | 134 return NULL; |
135 } | 135 } |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 ASSERT_EQ(1, tab_strip->count()); | 1401 ASSERT_EQ(1, tab_strip->count()); |
1402 EXPECT_EQ("title1.html", | 1402 EXPECT_EQ("title1.html", |
1403 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1403 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
1404 } | 1404 } |
1405 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 1405 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
1406 | 1406 |
1407 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || | 1407 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || |
1408 // defined(ENABLE_CONFIGURATION_POLICY) | 1408 // defined(ENABLE_CONFIGURATION_POLICY) |
1409 | 1409 |
1410 #endif // !defined(OS_CHROMEOS) | 1410 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |