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

Side by Side Diff: chrome/browser/chromeos/login/hwid_checker.cc

Issue 1544433002: Replace RE2 import with a dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-Added LICENSE and OWNERS file Created 5 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/login/hwid_checker.h" 5 #include "chrome/browser/chromeos/login/hwid_checker.h"
6 6
7 #include <cstdio> 7 #include <cstdio>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "base/sys_info.h" 12 #include "base/sys_info.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chromeos/chromeos_switches.h" 14 #include "chromeos/chromeos_switches.h"
15 #include "chromeos/system/statistics_provider.h" 15 #include "chromeos/system/statistics_provider.h"
16 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
17 #include "third_party/re2/re2/re2.h" 17 #include "third_party/re2/src/re2/re2.h"
18 #include "third_party/zlib/zlib.h" 18 #include "third_party/zlib/zlib.h"
19 19
20 namespace { 20 namespace {
21 21
22 unsigned CalculateCRC32(const std::string& data) { 22 unsigned CalculateCRC32(const std::string& data) {
23 return static_cast<unsigned>(crc32( 23 return static_cast<unsigned>(crc32(
24 0, 24 0,
25 reinterpret_cast<const Bytef*>(data.c_str()), 25 reinterpret_cast<const Bytef*>(data.c_str()),
26 data.length())); 26 data.length()));
27 } 27 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return false; 126 return false;
127 } 127 }
128 if (!chromeos::IsHWIDCorrect(hwid)) { 128 if (!chromeos::IsHWIDCorrect(hwid)) {
129 LOG(ERROR) << "Machine has malformed HWID '" << hwid << "'."; 129 LOG(ERROR) << "Machine has malformed HWID '" << hwid << "'.";
130 return false; 130 return false;
131 } 131 }
132 return true; 132 return true;
133 } 133 }
134 134
135 } // namespace chromeos 135 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/android/data_usage/data_use_matcher.cc ('k') | chrome/browser/chromeos/policy/system_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698