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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/installer/util/shell_util.cc ('k') | chrome/test/base/testing_profile.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 (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/test/base/in_process_browser_test.h" 5 #include "chrome/test/base/in_process_browser_test.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Single-process mode is not set in BrowserMain, so process it explicitly, 171 // Single-process mode is not set in BrowserMain, so process it explicitly,
172 // and set up renderer. 172 // and set up renderer.
173 if (command_line->HasSwitch(switches::kSingleProcess)) { 173 if (command_line->HasSwitch(switches::kSingleProcess)) {
174 content::SetRendererClientForTesting( 174 content::SetRendererClientForTesting(
175 &g_chrome_content_renderer_client.Get()); 175 &g_chrome_content_renderer_client.Get());
176 } 176 }
177 177
178 #if defined(OS_CHROMEOS) 178 #if defined(OS_CHROMEOS)
179 // Make sure that the log directory exists. 179 // Make sure that the log directory exists.
180 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName(); 180 base::FilePath log_dir = logging::GetSessionLogFile(*command_line).DirName();
181 file_util::CreateDirectory(log_dir); 181 base::CreateDirectory(log_dir);
182 #endif // defined(OS_CHROMEOS) 182 #endif // defined(OS_CHROMEOS)
183 183
184 #if defined(OS_MACOSX) 184 #if defined(OS_MACOSX)
185 // On Mac, without the following autorelease pool, code which is directly 185 // On Mac, without the following autorelease pool, code which is directly
186 // executed (as opposed to executed inside a message loop) would autorelease 186 // executed (as opposed to executed inside a message loop) would autorelease
187 // objects into a higher-level pool. This pool is not recycled in-sync with 187 // objects into a higher-level pool. This pool is not recycled in-sync with
188 // the message loops' pools and causes problems with code relying on 188 // the message loops' pools and causes problems with code relying on
189 // deallocation via an autorelease pool (such as browser window closure and 189 // deallocation via an autorelease pool (such as browser window closure and
190 // browser shutdown). To avoid this, the following pool is recycled after each 190 // browser shutdown). To avoid this, the following pool is recycled after each
191 // time code is directly executed. 191 // time code is directly executed.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // On the Mac, this eventually reaches 468 // On the Mac, this eventually reaches
469 // -[BrowserWindowController windowWillClose:], which will post a deferred 469 // -[BrowserWindowController windowWillClose:], which will post a deferred
470 // -autorelease on itself to ultimately destroy the Browser object. The line 470 // -autorelease on itself to ultimately destroy the Browser object. The line
471 // below is necessary to pump these pending messages to ensure all Browsers 471 // below is necessary to pump these pending messages to ensure all Browsers
472 // get deleted. 472 // get deleted.
473 content::RunAllPendingInMessageLoop(); 473 content::RunAllPendingInMessageLoop();
474 delete autorelease_pool_; 474 delete autorelease_pool_;
475 autorelease_pool_ = NULL; 475 autorelease_pool_ = NULL;
476 #endif 476 #endif
477 } 477 }
OLDNEW
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698