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

Side by Side Diff: chrome/common/logging_chrome.cc

Issue 204123002: cros: Don't prefix test user profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests and session log dir Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper_browsertest.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) 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 // Need to include this before most other files because it defines 7 // Need to include this before most other files because it defines
8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 8 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the 9 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the
10 // ViewMsgLog et al. functions. 10 // ViewMsgLog et al. functions.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 std::string log_dir_str; 202 std::string log_dir_str;
203 scoped_ptr<base::Environment> env(base::Environment::Create()); 203 scoped_ptr<base::Environment> env(base::Environment::Create());
204 if (env->GetVar(env_vars::kSessionLogDir, &log_dir_str) && 204 if (env->GetVar(env_vars::kSessionLogDir, &log_dir_str) &&
205 !log_dir_str.empty()) { 205 !log_dir_str.empty()) {
206 log_dir = base::FilePath(log_dir_str); 206 log_dir = base::FilePath(log_dir_str);
207 } else if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) { 207 } else if (command_line.HasSwitch(chromeos::switches::kLoginProfile)) {
208 PathService::Get(chrome::DIR_USER_DATA, &log_dir); 208 PathService::Get(chrome::DIR_USER_DATA, &log_dir);
209 base::FilePath profile_dir; 209 base::FilePath profile_dir;
210 std::string login_profile_value = 210 std::string login_profile_value =
211 command_line.GetSwitchValueASCII(chromeos::switches::kLoginProfile); 211 command_line.GetSwitchValueASCII(chromeos::switches::kLoginProfile);
212 if (login_profile_value == chrome::kLegacyProfileDir) { 212 if (login_profile_value == chrome::kLegacyProfileDir ||
213 login_profile_value == chrome::kTestUserProfileDir) {
213 profile_dir = base::FilePath(login_profile_value); 214 profile_dir = base::FilePath(login_profile_value);
214 } else { 215 } else {
215 // We could not use g_browser_process > profile_helper() here. 216 // We could not use g_browser_process > profile_helper() here.
216 std::string profile_dir_str = chrome::kProfileDirPrefix; 217 std::string profile_dir_str = chrome::kProfileDirPrefix;
217 profile_dir_str.append(login_profile_value); 218 profile_dir_str.append(login_profile_value);
218 profile_dir = base::FilePath(profile_dir_str); 219 profile_dir = base::FilePath(profile_dir_str);
219 } 220 }
220 log_dir = log_dir.Append(profile_dir); 221 log_dir = log_dir.Append(profile_dir);
221 } 222 }
222 return log_dir.Append(GetLogFileName().BaseName()); 223 return log_dir.Append(GetLogFileName().BaseName());
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 time_deets.year, 440 time_deets.year,
440 time_deets.month, 441 time_deets.month,
441 time_deets.day_of_month, 442 time_deets.day_of_month,
442 time_deets.hour, 443 time_deets.hour,
443 time_deets.minute, 444 time_deets.minute,
444 time_deets.second); 445 time_deets.second);
445 return base_path.InsertBeforeExtensionASCII(suffix); 446 return base_path.InsertBeforeExtensionASCII(suffix);
446 } 447 }
447 448
448 } // namespace logging 449 } // namespace logging
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698