| 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 "chrome/browser/shell_integration.h" | 5 #include "chrome/browser/shell_integration.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 struct ShortcutTestObject { | 28 struct ShortcutTestObject { |
| 29 base::FilePath path; | 29 base::FilePath path; |
| 30 base::win::ShortcutProperties properties; | 30 base::win::ShortcutProperties properties; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 class ShellIntegrationWinMigrateShortcutTest : public testing::Test { | 33 class ShellIntegrationWinMigrateShortcutTest : public testing::Test { |
| 34 protected: | 34 protected: |
| 35 virtual void SetUp() override { | 35 void SetUp() override { |
| 36 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 36 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 37 | 37 |
| 38 // A path to a random target. | 38 // A path to a random target. |
| 39 base::CreateTemporaryFileInDir(temp_dir_.path(), &other_target_); | 39 base::CreateTemporaryFileInDir(temp_dir_.path(), &other_target_); |
| 40 | 40 |
| 41 // This doesn't need to actually have a base name of "chrome.exe". | 41 // This doesn't need to actually have a base name of "chrome.exe". |
| 42 base::CreateTemporaryFileInDir(temp_dir_.path(), &chrome_exe_); | 42 base::CreateTemporaryFileInDir(temp_dir_.path(), &chrome_exe_); |
| 43 | 43 |
| 44 chrome_app_id_ = | 44 chrome_app_id_ = |
| 45 ShellUtil::GetBrowserModelId(BrowserDistribution::GetDistribution(), | 45 ShellUtil::GetBrowserModelId(BrowserDistribution::GetDistribution(), |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 default_profile_path)); | 367 default_profile_path)); |
| 368 | 368 |
| 369 // Non-default profile path should get chrome::kBrowserAppID + AppList joined | 369 // Non-default profile path should get chrome::kBrowserAppID + AppList joined |
| 370 // with profile info. | 370 // with profile info. |
| 371 base::FilePath profile_path(FILE_PATH_LITERAL("root")); | 371 base::FilePath profile_path(FILE_PATH_LITERAL("root")); |
| 372 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 372 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
| 373 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 373 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
| 374 EXPECT_EQ(base_app_id + L".udd.UserDataTest", | 374 EXPECT_EQ(base_app_id + L".udd.UserDataTest", |
| 375 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); | 375 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); |
| 376 } | 376 } |
| OLD | NEW |