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

Side by Side Diff: chrome_frame/chrome_tab.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_frame/chrome_launcher_utils.cc ('k') | chrome_frame/simple_resource_loader.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 // chrome_tab.cc : Implementation of DLL Exports. 5 // chrome_tab.cc : Implementation of DLL Exports.
6 6
7 // Need to include this before the ATL headers below. 7 // Need to include this before the ATL headers below.
8 #include "chrome_frame/chrome_tab.h" 8 #include "chrome_frame/chrome_tab.h"
9 9
10 #include <atlsecurity.h> 10 #include <atlsecurity.h>
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 337
338 // Remove existing run-at-startup entry. 338 // Remove existing run-at-startup entry.
339 base::win::RemoveCommandFromAutoRun(HKEY_CURRENT_USER, kRunKeyName); 339 base::win::RemoveCommandFromAutoRun(HKEY_CURRENT_USER, kRunKeyName);
340 340
341 // Build the chrome_frame_helper command line. 341 // Build the chrome_frame_helper command line.
342 base::FilePath module_path; 342 base::FilePath module_path;
343 base::FilePath helper_path; 343 base::FilePath helper_path;
344 if (PathService::Get(base::FILE_MODULE, &module_path)) { 344 if (PathService::Get(base::FILE_MODULE, &module_path)) {
345 module_path = module_path.DirName(); 345 module_path = module_path.DirName();
346 helper_path = module_path.Append(kChromeFrameHelperExe); 346 helper_path = module_path.Append(kChromeFrameHelperExe);
347 if (!file_util::PathExists(helper_path)) { 347 if (!base::PathExists(helper_path)) {
348 // If we can't find the helper in the current directory, try looking 348 // If we can't find the helper in the current directory, try looking
349 // one up (this is the layout in the build output folder). 349 // one up (this is the layout in the build output folder).
350 module_path = module_path.DirName(); 350 module_path = module_path.DirName();
351 helper_path = module_path.Append(kChromeFrameHelperExe); 351 helper_path = module_path.Append(kChromeFrameHelperExe);
352 DCHECK(file_util::PathExists(helper_path)) << 352 DCHECK(base::PathExists(helper_path)) <<
353 "Could not find chrome_frame_helper.exe."; 353 "Could not find chrome_frame_helper.exe.";
354 } 354 }
355 355
356 // Find window handle of existing instance. 356 // Find window handle of existing instance.
357 HWND old_window = FindWindow(kChromeFrameHelperWindowClassName, 357 HWND old_window = FindWindow(kChromeFrameHelperWindowClassName,
358 kChromeFrameHelperWindowName); 358 kChromeFrameHelperWindowName);
359 359
360 if (file_util::PathExists(helper_path)) { 360 if (base::PathExists(helper_path)) {
361 std::wstring helper_path_cmd(L"\""); 361 std::wstring helper_path_cmd(L"\"");
362 helper_path_cmd += helper_path.value(); 362 helper_path_cmd += helper_path.value();
363 helper_path_cmd += L"\" "; 363 helper_path_cmd += L"\" ";
364 helper_path_cmd += kChromeFrameHelperStartupArg; 364 helper_path_cmd += kChromeFrameHelperStartupArg;
365 365
366 // Add new run-at-startup entry. 366 // Add new run-at-startup entry.
367 if (!base::win::AddCommandToAutoRun(HKEY_CURRENT_USER, kRunKeyName, 367 if (!base::win::AddCommandToAutoRun(HKEY_CURRENT_USER, kRunKeyName,
368 helper_path_cmd)) { 368 helper_path_cmd)) {
369 hr = E_FAIL; 369 hr = E_FAIL;
370 LOG(ERROR) << "Could not add helper process to auto run key."; 370 LOG(ERROR) << "Could not add helper process to auto run key.";
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 HRESULT hr = CustomRegistration(ALL, FALSE, false); 974 HRESULT hr = CustomRegistration(ALL, FALSE, false);
975 return hr; 975 return hr;
976 } 976 }
977 977
978 // Object entries go here instead of with each object, so that we can move 978 // Object entries go here instead of with each object, so that we can move
979 // the objects to a lib. Also reduces magic. 979 // the objects to a lib. Also reduces magic.
980 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho) 980 OBJECT_ENTRY_AUTO(CLSID_ChromeFrameBHO, Bho)
981 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument) 981 OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument)
982 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex) 982 OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex)
983 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol) 983 OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol)
OLDNEW
« no previous file with comments | « chrome_frame/chrome_launcher_utils.cc ('k') | chrome_frame/simple_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698