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

Side by Side Diff: chrome/browser/chromeos/extensions/default_app_order_unittest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/chromeos/extensions/default_app_order.h" 5 #include "chrome/browser/chromeos/extensions/default_app_order.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 void SetExternalFile(const base::FilePath& path) { 51 void SetExternalFile(const base::FilePath& path) {
52 path_override_.reset(new base::ScopedPathOverride( 52 path_override_.reset(new base::ScopedPathOverride(
53 chromeos::FILE_DEFAULT_APP_ORDER, path)); 53 chromeos::FILE_DEFAULT_APP_ORDER, path));
54 } 54 }
55 55
56 void CreateExternalOrderFile(const std::string& content) { 56 void CreateExternalOrderFile(const std::string& content) {
57 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 57 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
58 base::FilePath external_file = temp_dir_.path().Append(kTestFile); 58 base::FilePath external_file = temp_dir_.path().Append(kTestFile);
59 file_util::WriteFile(external_file, content.c_str(), content.size()); 59 base::WriteFile(external_file, content.c_str(), content.size());
60 SetExternalFile(external_file); 60 SetExternalFile(external_file);
61 } 61 }
62 62
63 private: 63 private:
64 std::vector<std::string> built_in_default_; 64 std::vector<std::string> built_in_default_;
65 65
66 base::ScopedTempDir temp_dir_; 66 base::ScopedTempDir temp_dir_;
67 scoped_ptr<base::ScopedPathOverride> path_override_; 67 scoped_ptr<base::ScopedPathOverride> path_override_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(DefaultAppOrderTest); 69 DISALLOW_COPY_AND_ASSIGN(DefaultAppOrderTest);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 scoped_ptr<default_app_order::ExternalLoader> loader( 119 scoped_ptr<default_app_order::ExternalLoader> loader(
120 new default_app_order::ExternalLoader(false)); 120 new default_app_order::ExternalLoader(false));
121 121
122 std::vector<std::string> apps; 122 std::vector<std::string> apps;
123 default_app_order::Get(&apps); 123 default_app_order::Get(&apps);
124 EXPECT_TRUE(IsBuiltInDefault(apps)); 124 EXPECT_TRUE(IsBuiltInDefault(apps));
125 } 125 }
126 126
127 } // namespace chromeos 127 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698