clang-format chromium_src

This commit is contained in:
Shelley Vohr 2018-04-17 21:47:44 -04:00
parent c090dd2f81
commit 8cc81509d7
No known key found for this signature in database
GPG key ID: F13993A75599653C
38 changed files with 202 additions and 231 deletions

View file

@ -209,9 +209,7 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
// Getters.
PrintedDocument* document() const;
PrintedPage* page() const;
Type type() const {
return type_;
}
Type type() const { return type_; }
private:
friend class base::RefCountedThreadSafe<JobEventDetails>;

View file

@ -43,7 +43,7 @@ class PrintQueriesQueue : public base::RefCountedThreadSafe<PrintQueriesQueue> {
private:
friend class base::RefCountedThreadSafe<PrintQueriesQueue>;
typedef std::vector<scoped_refptr<PrinterQuery> > PrinterQueries;
typedef std::vector<scoped_refptr<PrinterQuery>> PrinterQueries;
virtual ~PrintQueriesQueue();
@ -73,7 +73,7 @@ class PrintJobManager : public content::NotificationObserver {
scoped_refptr<PrintQueriesQueue> queue();
private:
typedef std::set<scoped_refptr<PrintJob> > PrintJobs;
typedef std::set<scoped_refptr<PrintJob>> PrintJobs;
// Processes a NOTIFY_PRINT_JOB_EVENT notification.
void OnPrintJobEvent(PrintJob* print_job,

View file

@ -77,8 +77,7 @@ class PrintJobWorker {
bool IsRunning() const;
// Posts the given task to be run.
bool PostTask(const base::Location& from_here,
const base::Closure& task);
bool PostTask(const base::Location& from_here, const base::Closure& task);
// Signals the thread to exit in the near future.
void StopSoon();
@ -114,10 +113,9 @@ class PrintJobWorker {
// Asks the user for print settings. Must be called on the UI thread.
// Required on Mac and Linux. Windows can display UI from non-main threads,
// but sticks with this for consistency.
void GetSettingsWithUI(
int document_page_count,
bool has_selection,
bool is_scripted);
void GetSettingsWithUI(int document_page_count,
bool has_selection,
bool is_scripted);
// Called on the UI thread to update the print settings.
void UpdatePrintSettings(std::unique_ptr<base::DictionaryValue> new_settings);

View file

@ -14,7 +14,7 @@
namespace base {
class MessageLoop;
class SequencedTaskRunner;
}
} // namespace base
namespace printing {
@ -48,8 +48,7 @@ class PrintJobWorkerOwner
bool RunsTasksInCurrentSequence() const;
// Posts the given task to be run.
bool PostTask(const base::Location& from_here,
const base::Closure& task);
bool PostTask(const base::Location& from_here, const base::Closure& task);
protected:
friend class base::RefCountedThreadSafe<PrintJobWorkerOwner>;

View file

@ -9,8 +9,8 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "components/prefs/pref_member.h"
#include "base/strings/string16.h"
#include "components/prefs/pref_member.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@ -41,16 +41,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
virtual bool PrintNow(content::RenderFrameHost* rfh,
bool silent, bool print_background,
bool silent,
bool print_background,
const base::string16& device_name);
#endif // !DISABLE_BASIC_PRINTING
// PrintedPagesSource implementation.
base::string16 RenderSourceName();
void SetCallback(const base::Callback<void(bool)>& cb) {
callback = cb;
};
void SetCallback(const base::Callback<void(bool)>& cb) { callback = cb; };
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);

View file

@ -53,17 +53,16 @@ class PrinterQuery : public PrintJobWorkerOwner {
bool is_modifiable,
const base::Closure& callback);
void GetSettings(
GetSettingsAskParam ask_user_for_settings,
int expected_page_count,
bool has_selection,
MarginType margin_type,
bool is_scripted,
bool is_modifiable,
const base::string16& device_name,
const base::Closure& callback);
void GetSettings(GetSettingsAskParam ask_user_for_settings,
int expected_page_count,
bool has_selection,
MarginType margin_type,
bool is_scripted,
bool is_modifiable,
const base::string16& device_name,
const base::Closure& callback);
// Updates the current settings with |new_settings| dictionary values.
// Updates the current settings with |new_settings| dictionary values.
void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings,
const base::Closure& callback);

View file

@ -15,7 +15,7 @@ struct PrintHostMsg_ScriptedPrint_Params;
namespace base {
class DictionaryValue;
class FilePath;
}
} // namespace base
namespace content {
class WebContents;
@ -33,9 +33,8 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
PrintingMessageFilter(int render_process_id);
// content::BrowserMessageFilter methods.
void OverrideThreadForMessage(
const IPC::Message& message,
content::BrowserThread::ID* thread) override;
void OverrideThreadForMessage(const IPC::Message& message,
content::BrowserThread::ID* thread) override;
bool OnMessageReceived(const IPC::Message& message) override;
private: