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

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

Issue 138553004: Move component updater artifacts into component_updater namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/component_updater/component_updater_utils.h" 5 #include "chrome/browser/component_updater/component_updater_utils.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 id.append(1, val + 'a'); 159 id.append(1, val + 'a');
160 } else { 160 } else {
161 id.append(1, 'a'); 161 id.append(1, 'a');
162 } 162 }
163 } 163 }
164 DCHECK(extensions::Extension::IdIsValid(id)); 164 DCHECK(extensions::Extension::IdIsValid(id));
165 return id; 165 return id;
166 } 166 }
167 167
168 std::string GetCrxComponentID(const CrxComponent& component) { 168 std::string GetCrxComponentID(const CrxComponent& component) {
169 return component_updater::HexStringToID( 169 return HexStringToID(StringToLowerASCII(base::HexEncode(&component.pk_hash[0],
170 StringToLowerASCII(base::HexEncode(&component.pk_hash[0], 170 component.pk_hash.size()/2)));
171 component.pk_hash.size()/2)));
172 } 171 }
173 172
174 } // namespace component_updater 173 } // namespace component_updater
175 174
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/component_updater_service.cc ('k') | chrome/browser/component_updater/crx_update_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698