| Index: chrome/browser/metrics/metrics_service_uitest.cc
|
| diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
|
| index 93889c586788bab047d156a8a927038b0f91d783..4d67c135e36ebf65c99ffc6e743b851168d0a727 100644
|
| --- a/chrome/browser/metrics/metrics_service_uitest.cc
|
| +++ b/chrome/browser/metrics/metrics_service_uitest.cc
|
| @@ -13,14 +13,15 @@
|
| #include "base/platform_thread.h"
|
| #include "chrome/browser/browser_thread.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| +#include "chrome/browser/prefs/pref_service_mock_builder.h"
|
| #include "chrome/browser/prefs/pref_value_store.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/json_pref_store.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/url_constants.h"
|
| -#include "chrome/test/automation/tab_proxy.h"
|
| #include "chrome/test/automation/browser_proxy.h"
|
| +#include "chrome/test/automation/tab_proxy.h"
|
| #include "chrome/test/ui/ui_test.h"
|
| #include "net/base/net_util.h"
|
|
|
| @@ -51,10 +52,8 @@ class MetricsServiceTest : public UITest {
|
| // that was saved by the app as it closed. The caller takes ownership of the
|
| // returned PrefService object.
|
| PrefService* GetLocalState() {
|
| - FilePath local_state_path = user_data_dir()
|
| - .Append(chrome::kLocalStateFilename);
|
| -
|
| - return PrefService::CreateUserPrefService(local_state_path);
|
| + FilePath path = user_data_dir().Append(chrome::kLocalStateFilename);
|
| + return PrefServiceMockBuilder().WithUserFilePrefs(path).Create();
|
| }
|
| };
|
|
|
|
|