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

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: git try 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 profile_ = browser()->profile(); 79 profile_ = browser()->profile();
80 else 80 else
81 profile_ = ProfileManager::GetDefaultProfile(); 81 profile_ = ProfileManager::GetDefaultProfile();
82 } 82 }
83 return profile_; 83 return profile_;
84 } 84 }
85 85
86 // static 86 // static
87 const Extension* ExtensionBrowserTest::GetExtensionByPath( 87 const Extension* ExtensionBrowserTest::GetExtensionByPath(
88 const ExtensionSet* extensions, const base::FilePath& path) { 88 const ExtensionSet* extensions, const base::FilePath& path) {
89 base::FilePath extension_path = path; 89 base::FilePath extension_path = base::MakeAbsoluteFilePath(path);
90 EXPECT_TRUE(file_util::AbsolutePath(&extension_path)); 90 EXPECT_TRUE(!extension_path.empty());
91 for (ExtensionSet::const_iterator iter = extensions->begin(); 91 for (ExtensionSet::const_iterator iter = extensions->begin();
92 iter != extensions->end(); ++iter) { 92 iter != extensions->end(); ++iter) {
93 if ((*iter)->path() == extension_path) { 93 if ((*iter)->path() == extension_path) {
94 return *iter; 94 return *iter;
95 } 95 }
96 } 96 }
97 return NULL; 97 return NULL;
98 } 98 }
99 99
100 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { 100 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 case content::NOTIFICATION_LOAD_STOP: 735 case content::NOTIFICATION_LOAD_STOP:
736 VLOG(1) << "Got LOAD_STOP notification."; 736 VLOG(1) << "Got LOAD_STOP notification.";
737 MessageLoopForUI::current()->Quit(); 737 MessageLoopForUI::current()->Quit();
738 break; 738 break;
739 739
740 default: 740 default:
741 NOTREACHED(); 741 NOTREACHED();
742 break; 742 break;
743 } 743 }
744 } 744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698