| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/shell_integration.h" | 5 #include "chrome/browser/shell_integration.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 TEST(ShellIntegrationTest, GetChromiumAppIdTest) { | 335 TEST(ShellIntegrationTest, GetChromiumAppIdTest) { |
| 336 // Empty profile path should get chrome::kBrowserAppID | 336 // Empty profile path should get chrome::kBrowserAppID |
| 337 FilePath empty_path; | 337 FilePath empty_path; |
| 338 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), | 338 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), |
| 339 ShellIntegration::GetChromiumAppId(empty_path)); | 339 ShellIntegration::GetChromiumAppId(empty_path)); |
| 340 | 340 |
| 341 // Default profile path should get chrome::kBrowserAppID | 341 // Default profile path should get chrome::kBrowserAppID |
| 342 FilePath default_user_data_dir; | 342 FilePath default_user_data_dir; |
| 343 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); | 343 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); |
| 344 FilePath default_profile_path = | 344 FilePath default_profile_path = |
| 345 default_user_data_dir.AppendASCII(chrome::kNotSignedInProfile); | 345 default_user_data_dir.AppendASCII(chrome::kInitialProfile); |
| 346 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), | 346 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), |
| 347 ShellIntegration::GetChromiumAppId(default_profile_path)); | 347 ShellIntegration::GetChromiumAppId(default_profile_path)); |
| 348 | 348 |
| 349 // Non-default profile path should get chrome::kBrowserAppID joined with | 349 // Non-default profile path should get chrome::kBrowserAppID joined with |
| 350 // profile info. | 350 // profile info. |
| 351 FilePath profile_path(FILE_PATH_LITERAL("root")); | 351 FilePath profile_path(FILE_PATH_LITERAL("root")); |
| 352 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 352 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
| 353 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 353 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
| 354 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + | 354 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + |
| 355 L".udd.UserDataTest", | 355 L".udd.UserDataTest", |
| 356 ShellIntegration::GetChromiumAppId(profile_path)); | 356 ShellIntegration::GetChromiumAppId(profile_path)); |
| 357 } | 357 } |
| 358 #endif | 358 #endif |
| OLD | NEW |