| OLD | NEW |
| 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/profile_resetter/automatic_profile_resetter_mementos.h" | 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_mementos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const base::FilePath& memento_file_path) { | 113 const base::FilePath& memento_file_path) { |
| 114 std::string value; | 114 std::string value; |
| 115 base::ReadFileToString(memento_file_path, &value); | 115 base::ReadFileToString(memento_file_path, &value); |
| 116 return value; | 116 return value; |
| 117 } | 117 } |
| 118 | 118 |
| 119 void FileHostedPromptMemento::StoreValueOnFileThread( | 119 void FileHostedPromptMemento::StoreValueOnFileThread( |
| 120 const base::FilePath& memento_file_path, | 120 const base::FilePath& memento_file_path, |
| 121 const std::string& value) { | 121 const std::string& value) { |
| 122 int retval = | 122 int retval = |
| 123 file_util::WriteFile(memento_file_path, value.c_str(), value.size()); | 123 base::WriteFile(memento_file_path, value.c_str(), value.size()); |
| 124 DCHECK_EQ(retval, (int)value.size()); | 124 DCHECK_EQ(retval, (int)value.size()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 base::FilePath FileHostedPromptMemento::GetMementoFilePath() const { | 127 base::FilePath FileHostedPromptMemento::GetMementoFilePath() const { |
| 128 return profile_->GetPath().Append(chrome::kResetPromptMementoFilename); | 128 return profile_->GetPath().Append(chrome::kResetPromptMementoFilename); |
| 129 } | 129 } |
| OLD | NEW |