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

Side by Side Diff: chrome/browser/shell_integration.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/browser/sessions/session_backend.cc ('k') | chrome/browser/shell_integration_linux.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/browser/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Use the same UserDataDir for new launches that we currently have set. 73 // Use the same UserDataDir for new launches that we currently have set.
74 base::FilePath user_data_dir = 74 base::FilePath user_data_dir =
75 cmd_line.GetSwitchValuePath(switches::kUserDataDir); 75 cmd_line.GetSwitchValuePath(switches::kUserDataDir);
76 #if defined(OS_MACOSX) || defined(OS_WIN) 76 #if defined(OS_MACOSX) || defined(OS_WIN)
77 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir); 77 policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
78 #endif 78 #endif
79 if (!user_data_dir.empty()) { 79 if (!user_data_dir.empty()) {
80 // Make sure user_data_dir is an absolute path. 80 // Make sure user_data_dir is an absolute path.
81 user_data_dir = base::MakeAbsoluteFilePath(user_data_dir); 81 user_data_dir = base::MakeAbsoluteFilePath(user_data_dir);
82 if (!user_data_dir.empty() && file_util::PathExists(user_data_dir)) 82 if (!user_data_dir.empty() && base::PathExists(user_data_dir))
83 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir); 83 new_cmd_line.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
84 } 84 }
85 85
86 #if defined(OS_CHROMEOS) 86 #if defined(OS_CHROMEOS)
87 base::FilePath profile = cmd_line.GetSwitchValuePath( 87 base::FilePath profile = cmd_line.GetSwitchValuePath(
88 chromeos::switches::kLoginProfile); 88 chromeos::switches::kLoginProfile);
89 if (!profile.empty()) 89 if (!profile.empty())
90 new_cmd_line.AppendSwitchPath(chromeos::switches::kLoginProfile, profile); 90 new_cmd_line.AppendSwitchPath(chromeos::switches::kLoginProfile, profile);
91 #else 91 #else
92 if (!profile_path.empty() && !extension_app_id.empty()) 92 if (!profile_path.empty() && !extension_app_id.empty())
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 result = ShellIntegration::SetAsDefaultProtocolClientInteractive( 296 result = ShellIntegration::SetAsDefaultProtocolClientInteractive(
297 protocol_); 297 protocol_);
298 } 298 }
299 break; 299 break;
300 default: 300 default:
301 NOTREACHED(); 301 NOTREACHED();
302 } 302 }
303 303
304 return result; 304 return result;
305 } 305 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_backend.cc ('k') | chrome/browser/shell_integration_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698