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

Unified Diff: cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h

Issue 20238002: GCP2.0 Device: XMPP (without pings). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DEPS-jingle
Patch Set: Created 7 years, 5 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
Index: cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h
diff --git a/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h b/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h
new file mode 100644
index 0000000000000000000000000000000000000000..efe671908e617ad19615d83936fc63596ebc9526
--- /dev/null
+++ b/cloud_print/gcp20/prototype/cloud_print_url_request_context_getter.h
@@ -0,0 +1,36 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_URL_REQUEST_CONTEXT_GETTER_H_
+#define CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_URL_REQUEST_CONTEXT_GETTER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "net/url_request/url_request_context_getter.h"
+
+// Used to return a dummy context, which lives on the message loop
+// given in the constructor.
+class CloudPrintURLRequestContextGetter : public net::URLRequestContextGetter {
+ public:
+ // |task_runner| must not be NULL.
+ explicit CloudPrintURLRequestContextGetter(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+
+ // URLRequestContextGetter implementation.
+ virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
+
+ virtual scoped_refptr<base::SingleThreadTaskRunner>
+ GetNetworkTaskRunner() const OVERRIDE;
+
+ private:
+ virtual ~CloudPrintURLRequestContextGetter();
+
+ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
+ scoped_ptr<net::URLRequestContext> context_;
+
+ DISALLOW_COPY_AND_ASSIGN(CloudPrintURLRequestContextGetter);
+};
+
+#endif // CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_URL_REQUEST_CONTEXT_GETTER_H_
+

Powered by Google App Engine
This is Rietveld 408576698