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

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

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move AsAbsolute back out of FilePath 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/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 profile_ = browser()->profile(); 75 profile_ = browser()->profile();
76 else 76 else
77 profile_ = ProfileManager::GetDefaultProfile(); 77 profile_ = ProfileManager::GetDefaultProfile();
78 } 78 }
79 return profile_; 79 return profile_;
80 } 80 }
81 81
82 // static 82 // static
83 const Extension* ExtensionBrowserTest::GetExtensionByPath( 83 const Extension* ExtensionBrowserTest::GetExtensionByPath(
84 const ExtensionSet* extensions, const base::FilePath& path) { 84 const ExtensionSet* extensions, const base::FilePath& path) {
85 base::FilePath extension_path = path; 85 base::FilePath extension_path = base::MakeAbsoluteFilePath(path);
86 EXPECT_TRUE(file_util::AbsolutePath(&extension_path)); 86 EXPECT_TRUE(!extension_path.empty());
87 for (ExtensionSet::const_iterator iter = extensions->begin(); 87 for (ExtensionSet::const_iterator iter = extensions->begin();
88 iter != extensions->end(); ++iter) { 88 iter != extensions->end(); ++iter) {
89 if ((*iter)->path() == extension_path) { 89 if ((*iter)->path() == extension_path) {
90 return *iter; 90 return *iter;
91 } 91 }
92 } 92 }
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { 96 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 case content::NOTIFICATION_LOAD_STOP: 727 case content::NOTIFICATION_LOAD_STOP:
728 VLOG(1) << "Got LOAD_STOP notification."; 728 VLOG(1) << "Got LOAD_STOP notification.";
729 MessageLoopForUI::current()->Quit(); 729 MessageLoopForUI::current()->Quit();
730 break; 730 break;
731 731
732 default: 732 default:
733 NOTREACHED(); 733 NOTREACHED();
734 break; 734 break;
735 } 735 }
736 } 736 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698