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

Side by Side Diff: chrome/browser/chromeos/system/timezone_settings.cc

Issue 16950028: Move file_util::Delete to the 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
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/system/timezone_settings.h" 5 #include "chrome/browser/chromeos/system/timezone_settings.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/chromeos/chromeos_version.h" 10 #include "base/chromeos/chromeos_version.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 base::FilePath timezone_file(kTimezoneFilesDir + id); 201 base::FilePath timezone_file(kTimezoneFilesDir + id);
202 202
203 // Make sure timezone_file exists. 203 // Make sure timezone_file exists.
204 if (!file_util::PathExists(timezone_file)) { 204 if (!file_util::PathExists(timezone_file)) {
205 LOG(ERROR) << "SetTimezoneID: Cannot find timezone file " 205 LOG(ERROR) << "SetTimezoneID: Cannot find timezone file "
206 << timezone_file.value(); 206 << timezone_file.value();
207 return; 207 return;
208 } 208 }
209 209
210 // Delete old symlink2 if it exists. 210 // Delete old symlink2 if it exists.
211 file_util::Delete(timezone_symlink2, false); 211 base::Delete(timezone_symlink2, false);
212 212
213 // Create new symlink2. 213 // Create new symlink2.
214 if (symlink(timezone_file.value().c_str(), 214 if (symlink(timezone_file.value().c_str(),
215 timezone_symlink2.value().c_str()) == -1) { 215 timezone_symlink2.value().c_str()) == -1) {
216 LOG(ERROR) << "SetTimezoneID: Unable to create symlink " 216 LOG(ERROR) << "SetTimezoneID: Unable to create symlink "
217 << timezone_symlink2.value() << " to " << timezone_file.value(); 217 << timezone_symlink2.value() << " to " << timezone_file.value();
218 return; 218 return;
219 } 219 }
220 220
221 // Move symlink2 to symlink. 221 // Move symlink2 to symlink.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 // static 451 // static
452 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { 452 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) {
453 icu::UnicodeString id; 453 icu::UnicodeString id;
454 timezone.getID(id); 454 timezone.getID(id);
455 return string16(id.getBuffer(), id.length()); 455 return string16(id.getBuffer(), id.length());
456 } 456 }
457 457
458 } // namespace system 458 } // namespace system
459 } // namespace chromeos 459 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/system/syslogs_provider.cc ('k') | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698