1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_RAPPOR_LOG_UPLOADER_INTERFACE_H_ 6 #define COMPONENTS_RAPPOR_LOG_UPLOADER_INTERFACE_H_ 7 8 namespace rappor { 9 10 class LogUploaderInterface { 11 public: LogUploaderInterface()12 LogUploaderInterface() {} ~LogUploaderInterface()13 virtual ~LogUploaderInterface() {} 14 15 // Begin uploading logs. 16 virtual void Start() = 0; 17 18 // Stops uploading logs. 19 virtual void Stop() = 0; 20 21 // Adds an entry to the queue of logs to be uploaded to the server. The 22 // uploader makes no assumptions about the format of |log| and simply sends 23 // it verbatim to the server. 24 virtual void QueueLog(const std::string& log) = 0; 25 }; 26 27 } // namespace rappor 28 29 #endif // COMPONENTS_RAPPOR_LOG_UPLOADER_INTERFACE_H_ 30