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

Side by Side Diff: chrome/browser/extensions/platform_app_launcher.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
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/extensions/platform_app_launcher.h" 5 #include "chrome/browser/extensions/platform_app_launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 namespace { 57 namespace {
58 58
59 bool MakePathAbsolute(const base::FilePath& current_directory, 59 bool MakePathAbsolute(const base::FilePath& current_directory,
60 base::FilePath* file_path) { 60 base::FilePath* file_path) {
61 DCHECK(file_path); 61 DCHECK(file_path);
62 if (file_path->IsAbsolute()) 62 if (file_path->IsAbsolute())
63 return true; 63 return true;
64 64
65 if (current_directory.empty()) 65 if (current_directory.empty())
66 return file_util::AbsolutePath(file_path); 66 *file_path = file_path->AsAbsolute();
brettw 2013/03/30 04:19:38 Fix me.
67 67
68 if (!current_directory.IsAbsolute()) 68 if (!current_directory.IsAbsolute())
69 return false; 69 return false;
70 70
71 *file_path = current_directory.Append(*file_path); 71 *file_path = current_directory.Append(*file_path);
72 return true; 72 return true;
73 } 73 }
74 74
75 bool GetAbsolutePathFromCommandLine(const CommandLine* command_line, 75 bool GetAbsolutePathFromCommandLine(const CommandLine* command_line,
76 const base::FilePath& current_directory, 76 const base::FilePath& current_directory,
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 void RestartPlatformAppWithFileEntries( 413 void RestartPlatformAppWithFileEntries(
414 Profile* profile, 414 Profile* profile,
415 const Extension* extension, 415 const Extension* extension,
416 const std::vector<SavedFileEntry>& file_entries) { 416 const std::vector<SavedFileEntry>& file_entries) {
417 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher( 417 scoped_refptr<SavedFileEntryLauncher> launcher = new SavedFileEntryLauncher(
418 profile, extension, file_entries); 418 profile, extension, file_entries);
419 launcher->Launch(); 419 launcher->Launch();
420 } 420 }
421 421
422 } // namespace extensions 422 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698