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

Side by Side Diff: chrome/browser/chromeos/extensions/external_cache_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/external_cache.h" 5 #include "chrome/browser/chromeos/extensions/external_cache.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 extensions::LocalExtensionCache::kCacheReadyFlagFileName)); 103 extensions::LocalExtensionCache::kCacheReadyFlagFileName));
104 } 104 }
105 105
106 void CreateExtensionFile(const base::FilePath& dir, 106 void CreateExtensionFile(const base::FilePath& dir,
107 const std::string& id, 107 const std::string& id,
108 const std::string& version) { 108 const std::string& version) {
109 CreateFile(GetExtensionFile(dir, id, version)); 109 CreateFile(GetExtensionFile(dir, id, version));
110 } 110 }
111 111
112 void CreateFile(const base::FilePath& file) { 112 void CreateFile(const base::FilePath& file) {
113 EXPECT_EQ(file_util::WriteFile(file, NULL, 0), 0); 113 EXPECT_EQ(base::WriteFile(file, NULL, 0), 0);
114 } 114 }
115 115
116 base::FilePath GetExtensionFile(const base::FilePath& dir, 116 base::FilePath GetExtensionFile(const base::FilePath& dir,
117 const std::string& id, 117 const std::string& id,
118 const std::string& version) { 118 const std::string& version) {
119 return dir.Append(id + "-" + version + ".crx"); 119 return dir.Append(id + "-" + version + ".crx");
120 } 120 }
121 121
122 base::DictionaryValue* CreateEntryWithUpdateUrl(bool from_webstore) { 122 base::DictionaryValue* CreateEntryWithUpdateUrl(bool from_webstore) {
123 base::DictionaryValue* entry = new base::DictionaryValue; 123 base::DictionaryValue* entry = new base::DictionaryValue;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 ASSERT_TRUE(provided_prefs()->GetDictionary(kTestExtensionId1, &entry1)); 307 ASSERT_TRUE(provided_prefs()->GetDictionary(kTestExtensionId1, &entry1));
308 EXPECT_TRUE(entry1->HasKey( 308 EXPECT_TRUE(entry1->HasKey(
309 extensions::ExternalProviderImpl::kExternalUpdateUrl)); 309 extensions::ExternalProviderImpl::kExternalUpdateUrl));
310 EXPECT_FALSE(entry1->HasKey( 310 EXPECT_FALSE(entry1->HasKey(
311 extensions::ExternalProviderImpl::kExternalCrx)); 311 extensions::ExternalProviderImpl::kExternalCrx));
312 EXPECT_FALSE(entry1->HasKey( 312 EXPECT_FALSE(entry1->HasKey(
313 extensions::ExternalProviderImpl::kExternalVersion)); 313 extensions::ExternalProviderImpl::kExternalVersion));
314 } 314 }
315 315
316 } // namespace chromeos 316 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698