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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 18 matching lines...) Expand all Loading... |
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 virtual 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 file_util::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 file_util::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(), |
46 true); | 46 true); |
47 | 47 |
48 base::FilePath default_user_data_dir; | 48 base::FilePath default_user_data_dir; |
49 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); | 49 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); |
50 base::FilePath default_profile_path = | 50 base::FilePath default_profile_path = |
51 default_user_data_dir.AppendASCII(chrome::kInitialProfile); | 51 default_user_data_dir.AppendASCII(chrome::kInitialProfile); |
52 app_list_app_id_ = | 52 app_list_app_id_ = |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 default_profile_path)); | 366 default_profile_path)); |
367 | 367 |
368 // Non-default profile path should get chrome::kBrowserAppID + AppList joined | 368 // Non-default profile path should get chrome::kBrowserAppID + AppList joined |
369 // with profile info. | 369 // with profile info. |
370 base::FilePath profile_path(FILE_PATH_LITERAL("root")); | 370 base::FilePath profile_path(FILE_PATH_LITERAL("root")); |
371 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 371 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
372 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 372 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
373 EXPECT_EQ(base_app_id + L".udd.UserDataTest", | 373 EXPECT_EQ(base_app_id + L".udd.UserDataTest", |
374 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); | 374 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); |
375 } | 375 } |
OLD | NEW |