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

Side by Side Diff: chrome/browser/component_updater/default_component_installer.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 } else { 115 } else {
116 latest_dir = path; 116 latest_dir = path;
117 latest_version = version; 117 latest_version = version;
118 found = true; 118 found = true;
119 } 119 }
120 } 120 }
121 121
122 if (found) { 122 if (found) {
123 current_version_ = latest_version; 123 current_version_ = latest_version;
124 file_util::ReadFileToString(latest_dir.AppendASCII("manifest.fingerprint"), 124 base::ReadFileToString(latest_dir.AppendASCII("manifest.fingerprint"),
125 &current_fingerprint_); 125 &current_fingerprint_);
126 } 126 }
127 127
128 // Remove older versions of the component. None should be in use during 128 // Remove older versions of the component. None should be in use during
129 // browser startup. 129 // browser startup.
130 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin(); 130 for (std::vector<base::FilePath>::iterator iter = older_dirs.begin();
131 iter != older_dirs.end(); ++iter) { 131 iter != older_dirs.end(); ++iter) {
132 base::DeleteFile(*iter, true); 132 base::DeleteFile(*iter, true);
133 } 133 }
134 134
135 content::BrowserThread::PostTask( 135 content::BrowserThread::PostTask(
(...skipping 28 matching lines...) Expand all
164 base::Version installed_version; 164 base::Version installed_version;
165 if (current_version_.CompareTo(base::Version(kNullVersion)) <= 0) { 165 if (current_version_.CompareTo(base::Version(kNullVersion)) <= 0) {
166 content::BrowserThread::PostTask( 166 content::BrowserThread::PostTask(
167 content::BrowserThread::FILE, FROM_HERE, 167 content::BrowserThread::FILE, FROM_HERE,
168 base::Bind(&ComponentInstallerTraits::ComponentReady, 168 base::Bind(&ComponentInstallerTraits::ComponentReady,
169 base::Unretained(installer_traits_.get()), 169 base::Unretained(installer_traits_.get()),
170 installed_version, 170 installed_version,
171 GetInstallDirectory())); 171 GetInstallDirectory()));
172 } 172 }
173 } 173 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/version_loader.cc ('k') | chrome/browser/diagnostics/recon_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698