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

Side by Side Diff: chrome/browser/chromeos/policy/system_log_uploader.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/task_runner_util.h" 14 #include "base/task_runner_util.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/chromeos/policy/system_log_uploader.h" 16 #include "chrome/browser/chromeos/policy/system_log_uploader.h"
17 #include "chrome/browser/chromeos/policy/upload_job_impl.h" 17 #include "chrome/browser/chromeos/policy/upload_job_impl.h"
18 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" 18 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
19 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " 19 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h "
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "components/policy/core/browser/browser_policy_connector.h" 21 #include "components/policy/core/browser/browser_policy_connector.h"
22 #include "components/policy/core/common/cloud/enterprise_metrics.h" 22 #include "components/policy/core/common/cloud/enterprise_metrics.h"
23 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
24 #include "net/http/http_request_headers.h" 24 #include "net/http/http_request_headers.h"
25 #include "third_party/re2/re2/re2.h" 25 #include "third_party/re2/src/re2/re2.h"
26 26
27 namespace { 27 namespace {
28 // The maximum number of successive retries. 28 // The maximum number of successive retries.
29 const int kMaxNumRetries = 1; 29 const int kMaxNumRetries = 1;
30 30
31 // String constant defining the url tail we upload system logs to. 31 // String constant defining the url tail we upload system logs to.
32 const char* kSystemLogUploadUrlTail = "/upload"; 32 const char* kSystemLogUploadUrlTail = "/upload";
33 33
34 // The file names of the system logs to upload. 34 // The file names of the system logs to upload.
35 // Note: do not add anything to this list without checking for PII in the file. 35 // Note: do not add anything to this list without checking for PII in the file.
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 base::TimeDelta()); 352 base::TimeDelta());
353 // Ensure that we never have more than one pending delayed task. 353 // Ensure that we never have more than one pending delayed task.
354 weak_factory_.InvalidateWeakPtrs(); 354 weak_factory_.InvalidateWeakPtrs();
355 task_runner_->PostDelayedTask(FROM_HERE, 355 task_runner_->PostDelayedTask(FROM_HERE,
356 base::Bind(&SystemLogUploader::StartLogUpload, 356 base::Bind(&SystemLogUploader::StartLogUpload,
357 weak_factory_.GetWeakPtr()), 357 weak_factory_.GetWeakPtr()),
358 delay); 358 delay);
359 } 359 }
360 360
361 } // namespace policy 361 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/hwid_checker.cc ('k') | chrome/browser/download/download_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698