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

Unified Diff: headless/public/headless_browser.h

Issue 2013483002: headless: Make HeadlessBrowser::Options move-only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/lib/headless_content_main_delegate.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index de5f89bd3efe16457627eca07e5241876f3799c0..4b360575148edfe0ba214270d6921990ce3d9ffe 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -63,10 +63,12 @@ class HEADLESS_EXPORT HeadlessBrowser {
// Embedding API overrides for the headless browser.
struct HeadlessBrowser::Options {
- Options(const Options& other);
+ class Builder;
+
+ Options(Options&& options);
~Options();
- class Builder;
+ Options& operator=(Options&& options);
// Command line options to be passed to browser.
int argc;
@@ -97,6 +99,8 @@ struct HeadlessBrowser::Options {
private:
Options(int argc, const char** argv);
+
+ DISALLOW_COPY_AND_ASSIGN(Options);
};
class HeadlessBrowser::Options::Builder {
@@ -126,7 +130,7 @@ class HeadlessBrowser::Options::Builder {
// the main loop, it will only return after HeadlessBrowser::Shutdown() is
// called, returning the exit code for the process.
int HeadlessBrowserMain(
- const HeadlessBrowser::Options& options,
+ HeadlessBrowser::Options options,
const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback);
} // namespace headless
« no previous file with comments | « headless/lib/headless_content_main_delegate.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698