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 10 matching lines...) Expand all Loading... |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
24 #include "chrome/installer/util/browser_distribution.h" | 24 #include "chrome/installer/util/browser_distribution.h" |
25 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 25 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
26 #include "base/environment.h" | 26 #include "base/environment.h" |
27 #endif | 27 #endif |
28 | 28 |
29 #define FPL FILE_PATH_LITERAL | 29 #define FPL FILE_PATH_LITERAL |
30 | 30 |
| 31 using content::BrowserThread; |
| 32 |
31 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 33 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
32 namespace { | 34 namespace { |
33 | 35 |
34 // Provides mock environment variables values based on a stored map. | 36 // Provides mock environment variables values based on a stored map. |
35 class MockEnvironment : public base::Environment { | 37 class MockEnvironment : public base::Environment { |
36 public: | 38 public: |
37 MockEnvironment() {} | 39 MockEnvironment() {} |
38 | 40 |
39 void Set(const std::string& name, const std::string& value) { | 41 void Set(const std::string& name, const std::string& value) { |
40 variables_[name] = value; | 42 variables_[name] = value; |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // Non-default profile path should get chrome::kBrowserAppID joined with | 357 // Non-default profile path should get chrome::kBrowserAppID joined with |
356 // profile info. | 358 // profile info. |
357 FilePath profile_path(FILE_PATH_LITERAL("root")); | 359 FilePath profile_path(FILE_PATH_LITERAL("root")); |
358 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 360 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
359 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 361 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
360 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + | 362 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + |
361 L".udd.UserDataTest", | 363 L".udd.UserDataTest", |
362 ShellIntegration::GetChromiumAppId(profile_path)); | 364 ShellIntegration::GetChromiumAppId(profile_path)); |
363 } | 365 } |
364 #endif | 366 #endif |
OLD | NEW |