| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 non_default_user_data_dir_chrome_app_id_ = | 60 non_default_user_data_dir_chrome_app_id_ = |
| 61 ShellIntegration::GetChromiumModelIdForProfile( | 61 ShellIntegration::GetChromiumModelIdForProfile( |
| 62 non_default_user_data_dir_.AppendASCII(chrome::kInitialProfile)); | 62 non_default_user_data_dir_.AppendASCII(chrome::kInitialProfile)); |
| 63 non_default_user_data_dir_and_profile_chrome_app_id_ = | 63 non_default_user_data_dir_and_profile_chrome_app_id_ = |
| 64 ShellIntegration::GetChromiumModelIdForProfile( | 64 ShellIntegration::GetChromiumModelIdForProfile( |
| 65 non_default_user_data_dir_.Append(non_default_profile_)); | 65 non_default_user_data_dir_.Append(non_default_profile_)); |
| 66 | 66 |
| 67 | 67 |
| 68 extension_id_ = L"chromiumexampleappidforunittests"; | 68 extension_id_ = L"chromiumexampleappidforunittests"; |
| 69 base::string16 app_name = | 69 base::string16 app_name = |
| 70 UTF8ToUTF16(web_app::GenerateApplicationNameFromExtensionId( | 70 base::UTF8ToUTF16(web_app::GenerateApplicationNameFromExtensionId( |
| 71 UTF16ToUTF8(extension_id_))); | 71 base::UTF16ToUTF8(extension_id_))); |
| 72 extension_app_id_ = | 72 extension_app_id_ = |
| 73 ShellIntegration::GetAppModelIdForProfile(app_name, | 73 ShellIntegration::GetAppModelIdForProfile(app_name, |
| 74 default_profile_path); | 74 default_profile_path); |
| 75 non_default_profile_extension_app_id_ = | 75 non_default_profile_extension_app_id_ = |
| 76 ShellIntegration::GetAppModelIdForProfile( | 76 ShellIntegration::GetAppModelIdForProfile( |
| 77 app_name, | 77 app_name, |
| 78 default_user_data_dir.Append(non_default_profile_)); | 78 default_user_data_dir.Append(non_default_profile_)); |
| 79 | 79 |
| 80 CreateShortcuts(); | 80 CreateShortcuts(); |
| 81 } | 81 } |
| (...skipping 285 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 |