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

Side by Side Diff: webkit/tools/test_shell/test_shell_main.cc

Issue 3052034: base: Rename EnvVarGetter to Environment. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: review Created 10 years, 4 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
« base/environment.h ('K') | « remoting/host/simple_host_process.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/env_var.h" 8 #include "base/environment.h"
9 #include "base/event_recorder.h" 9 #include "base/event_recorder.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/i18n/icu_util.h" 12 #include "base/i18n/icu_util.h"
13 #include "base/memory_debug.h" 13 #include "base/memory_debug.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "base/path_service.h" 15 #include "base/path_service.h"
16 #include "base/process_util.h" 16 #include "base/process_util.h"
17 #include "base/rand_util.h" 17 #include "base/rand_util.h"
18 #include "base/stats_table.h" 18 #include "base/stats_table.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 TestShell::ShowStartupDebuggingDialog(); 85 TestShell::ShowStartupDebuggingDialog();
86 86
87 if (parsed_command_line.HasSwitch(test_shell::kCheckLayoutTestSystemDeps)) { 87 if (parsed_command_line.HasSwitch(test_shell::kCheckLayoutTestSystemDeps)) {
88 exit(platform.CheckLayoutTestSystemDependencies() ? 0 : 1); 88 exit(platform.CheckLayoutTestSystemDependencies() ? 0 : 1);
89 } 89 }
90 90
91 // Allocate a message loop for this thread. Although it is not used 91 // Allocate a message loop for this thread. Although it is not used
92 // directly, its constructor sets up some necessary state. 92 // directly, its constructor sets up some necessary state.
93 MessageLoopForUI main_message_loop; 93 MessageLoopForUI main_message_loop;
94 94
95 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); 95 scoped_ptr<base::Environment> env(base::Environment::Create());
96 bool suppress_error_dialogs = ( 96 bool suppress_error_dialogs = (
97 env->HasEnv("CHROME_HEADLESS") || 97 env->HasEnv("CHROME_HEADLESS") ||
98 parsed_command_line.HasSwitch(test_shell::kNoErrorDialogs) || 98 parsed_command_line.HasSwitch(test_shell::kNoErrorDialogs) ||
99 parsed_command_line.HasSwitch(test_shell::kLayoutTests)); 99 parsed_command_line.HasSwitch(test_shell::kLayoutTests));
100 bool layout_test_mode = 100 bool layout_test_mode =
101 parsed_command_line.HasSwitch(test_shell::kLayoutTests); 101 parsed_command_line.HasSwitch(test_shell::kLayoutTests);
102 bool ux_theme = parsed_command_line.HasSwitch(test_shell::kUxTheme); 102 bool ux_theme = parsed_command_line.HasSwitch(test_shell::kUxTheme);
103 bool classic_theme = 103 bool classic_theme =
104 parsed_command_line.HasSwitch(test_shell::kClassicTheme); 104 parsed_command_line.HasSwitch(test_shell::kClassicTheme);
105 #if defined(OS_WIN) 105 #if defined(OS_WIN)
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 TestShell::ShutdownTestShell(); 389 TestShell::ShutdownTestShell();
390 TestShell::CleanupLogging(); 390 TestShell::CleanupLogging();
391 391
392 // Tear down shared StatsTable; prevents unit_tests from leaking it. 392 // Tear down shared StatsTable; prevents unit_tests from leaking it.
393 StatsTable::set_current(NULL); 393 StatsTable::set_current(NULL);
394 delete table; 394 delete table;
395 RemoveSharedMemoryFile(stats_filename); 395 RemoveSharedMemoryFile(stats_filename);
396 396
397 return 0; 397 return 0;
398 } 398 }
OLDNEW
« base/environment.h ('K') | « remoting/host/simple_host_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698