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

Side by Side Diff: chrome/browser/extensions/user_script_listener_unittest.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/extensions/test_extension_dir.cc ('k') | chrome/browser/first_run/first_run.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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/json/json_file_value_serializer.h" 6 #include "base/json/json_file_value_serializer.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "chrome/browser/extensions/extension_service_unittest.h" 9 #include "chrome/browser/extensions/extension_service_unittest.h"
10 #include "chrome/browser/extensions/unpacked_installer.h" 10 #include "chrome/browser/extensions/unpacked_installer.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 test_headers(), 72 test_headers(),
73 kTestData, 73 kTestData,
74 true) {} 74 true) {}
75 private: 75 private:
76 virtual ~SimpleTestJob() {} 76 virtual ~SimpleTestJob() {}
77 }; 77 };
78 78
79 // Yoinked from extension_manifest_unittest.cc. 79 // Yoinked from extension_manifest_unittest.cc.
80 DictionaryValue* LoadManifestFile(const base::FilePath path, 80 DictionaryValue* LoadManifestFile(const base::FilePath path,
81 std::string* error) { 81 std::string* error) {
82 EXPECT_TRUE(file_util::PathExists(path)); 82 EXPECT_TRUE(base::PathExists(path));
83 JSONFileValueSerializer serializer(path); 83 JSONFileValueSerializer serializer(path);
84 return static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error)); 84 return static_cast<DictionaryValue*>(serializer.Deserialize(NULL, error));
85 } 85 }
86 86
87 scoped_refptr<Extension> LoadExtension(const std::string& filename, 87 scoped_refptr<Extension> LoadExtension(const std::string& filename,
88 std::string* error) { 88 std::string* error) {
89 base::FilePath path; 89 base::FilePath path;
90 PathService::Get(chrome::DIR_TEST_DATA, &path); 90 PathService::Get(chrome::DIR_TEST_DATA, &path);
91 path = path. 91 path = path.
92 AppendASCII("extensions"). 92 AppendASCII("extensions").
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 base::MessageLoop::current()->RunUntilIdle(); 342 base::MessageLoop::current()->RunUntilIdle();
343 343
344 bool defer = false; 344 bool defer = false;
345 throttle->WillStartRequest(&defer); 345 throttle->WillStartRequest(&defer);
346 ASSERT_FALSE(defer); 346 ASSERT_FALSE(defer);
347 } 347 }
348 348
349 } // namespace 349 } // namespace
350 350
351 } // namespace extensions 351 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_dir.cc ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698