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

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

Issue 1001873002: base: Rename discardable memory allocator interface and remove unnecessary class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-dm-types
Patch Set: fix child process DiscardableMemoryImpl Created 5 years, 9 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
« no previous file with comments | « chrome/test/base/chrome_unit_test_suite.h ('k') | content/browser/browser_main_loop.cc » ('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/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/chrome_content_browser_client.h" 10 #include "chrome/browser/chrome_content_browser_client.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 InitializeProviders(); 105 InitializeProviders();
106 RegisterInProcessThreads(); 106 RegisterInProcessThreads();
107 107
108 ChromeTestSuite::Initialize(); 108 ChromeTestSuite::Initialize();
109 109
110 // This needs to run after ChromeTestSuite::Initialize which calls content's 110 // This needs to run after ChromeTestSuite::Initialize which calls content's
111 // intialization which calls base's which initializes ICU. 111 // intialization which calls base's which initializes ICU.
112 InitializeResourceBundle(); 112 InitializeResourceBundle();
113 113
114 base::DiscardableMemoryShmemAllocator::SetInstance( 114 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
115 &discardable_memory_allocator_);
116 } 115 }
117 116
118 void ChromeUnitTestSuite::Shutdown() { 117 void ChromeUnitTestSuite::Shutdown() {
119 ResourceBundle::CleanupSharedInstance(); 118 ResourceBundle::CleanupSharedInstance();
120 ChromeTestSuite::Shutdown(); 119 ChromeTestSuite::Shutdown();
121 } 120 }
122 121
123 void ChromeUnitTestSuite::InitializeProviders() { 122 void ChromeUnitTestSuite::InitializeProviders() {
124 { 123 {
125 ChromeContentClient content_client; 124 ChromeContentClient content_client;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 #if defined(OS_MACOSX) && !defined(OS_IOS) 165 #if defined(OS_MACOSX) && !defined(OS_IOS)
167 PathService::Get(base::DIR_MODULE, &resources_pack_path); 166 PathService::Get(base::DIR_MODULE, &resources_pack_path);
168 resources_pack_path = 167 resources_pack_path =
169 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); 168 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak"));
170 #else 169 #else
171 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 170 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
172 #endif 171 #endif
173 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 172 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
174 resources_pack_path, ui::SCALE_FACTOR_NONE); 173 resources_pack_path, ui::SCALE_FACTOR_NONE);
175 } 174 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_unit_test_suite.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698