Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Side by Side Diff: chrome/test/base/chrome_unit_test_suite.cc

Issue 334783002: Componentize component_updater: Move some paths/constants to component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add component updater to common dependency list Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | components/component_updater.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/base/chrome_unit_test_suite.h" 5 #include "chrome/test/base/chrome_unit_test_suite.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/process/process_handle.h" 8 #include "base/process/process_handle.h"
9 #include "base/metrics/stats_table.h" 9 #include "base/metrics/stats_table.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "chrome/browser/chrome_content_browser_client.h" 11 #include "chrome/browser/chrome_content_browser_client.h"
12 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h " 12 #include "chrome/browser/omaha_query_params/chrome_omaha_query_params_delegate.h "
13 #include "chrome/common/chrome_content_client.h" 13 #include "chrome/common/chrome_content_client.h"
14 #include "chrome/common/chrome_paths.h" 14 #include "chrome/common/chrome_paths.h"
15 #include "chrome/test/base/testing_browser_process.h" 15 #include "chrome/test/base/testing_browser_process.h"
16 #include "chrome/utility/chrome_content_utility_client.h" 16 #include "chrome/utility/chrome_content_utility_client.h"
17 #include "components/component_updater/component_updater_paths.h"
17 #include "components/omaha_query_params/omaha_query_params.h" 18 #include "components/omaha_query_params/omaha_query_params.h"
18 #include "content/public/common/content_paths.h" 19 #include "content/public/common/content_paths.h"
19 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
20 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/resource/resource_handle.h" 22 #include "ui/base/resource/resource_handle.h"
22 #include "ui/base/ui_base_paths.h" 23 #include "ui/base/ui_base_paths.h"
23 24
24 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
25 #include "chromeos/chromeos_paths.h" 26 #include "chromeos/chromeos_paths.h"
26 #endif 27 #endif
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void ChromeUnitTestSuite::InitializeProviders() { 126 void ChromeUnitTestSuite::InitializeProviders() {
126 { 127 {
127 ChromeContentClient content_client; 128 ChromeContentClient content_client;
128 RegisterContentSchemes(&content_client); 129 RegisterContentSchemes(&content_client);
129 } 130 }
130 131
131 chrome::RegisterPathProvider(); 132 chrome::RegisterPathProvider();
132 content::RegisterPathProvider(); 133 content::RegisterPathProvider();
133 ui::RegisterPathProvider(); 134 ui::RegisterPathProvider();
134 135
136 base::FilePath user_data;
137 if (PathService::Get(chrome::DIR_USER_DATA, &user_data))
138 component_updater::RegisterPathProvider(user_data);
139
135 #if defined(OS_CHROMEOS) 140 #if defined(OS_CHROMEOS)
136 chromeos::RegisterPathProvider(); 141 chromeos::RegisterPathProvider();
137 #endif 142 #endif
138 143
139 #if !defined(OS_IOS) 144 #if !defined(OS_IOS)
140 extensions::RegisterPathProvider(); 145 extensions::RegisterPathProvider();
141 146
142 extensions::ExtensionsClient::Set( 147 extensions::ExtensionsClient::Set(
143 extensions::ChromeExtensionsClient::GetInstance()); 148 extensions::ChromeExtensionsClient::GetInstance());
144 149
(...skipping 15 matching lines...) Expand all
160 #if defined(OS_MACOSX) && !defined(OS_IOS) 165 #if defined(OS_MACOSX) && !defined(OS_IOS)
161 PathService::Get(base::DIR_MODULE, &resources_pack_path); 166 PathService::Get(base::DIR_MODULE, &resources_pack_path);
162 resources_pack_path = 167 resources_pack_path =
163 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 168 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
164 #else 169 #else
165 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 170 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
166 #endif 171 #endif
167 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 172 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
168 resources_pack_path, ui::SCALE_FACTOR_NONE); 173 resources_pack_path, ui::SCALE_FACTOR_NONE);
169 } 174 }
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | components/component_updater.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698