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

Unified Diff: content/child/child_thread_impl.h

Issue 974933002: content: Refactor ChildThreadImpl::Options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix. Created 5 years, 10 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 | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.h
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h
index 4016861820ae15b4ca009ca52a801256fe642471..352bbeca8b3f936321886ee8f431aa527ee41b3c 100644
--- a/content/child/child_thread_impl.h
+++ b/content/child/child_thread_impl.h
@@ -63,10 +63,10 @@ class CONTENT_EXPORT ChildThreadImpl
public:
struct CONTENT_EXPORT Options {
Options();
rmcilroy 2015/03/03 19:48:17 Could you make the constructor private and only ca
Sami 2015/03/04 11:37:15 Yep, done.
- explicit Options(bool mojo);
- Options(std::string name, bool mojo);
~Options();
+ class Builder;
+
std::string channel_name;
bool use_mojo_channel;
bool in_browser_process;
@@ -305,6 +305,20 @@ class CONTENT_EXPORT ChildThreadImpl
DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl);
};
+class ChildThreadImpl::Options::Builder {
+ public:
+ Builder();
+
+ Builder& InBrowserProcess(bool in_browser_process);
+ Builder& WithMojo(bool mojo);
rmcilroy 2015/03/03 19:48:17 nit - UseMojoChannel(bool use_mojo_channel)
Sami 2015/03/04 11:37:15 Done.
+ Builder& WithChannelName(const std::string& channel_name);
+
+ Options Build();
+
+ private:
+ struct Options options_;
rmcilroy 2015/03/03 19:48:16 nit - I think this might be clearer inlined in the
Sami 2015/03/04 11:37:15 Did you mean the Options object itself would have
rmcilroy 2015/03/04 12:22:01 No that's not what I meant - I prefer the builder
+};
+
} // namespace content
#endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
« no previous file with comments | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698