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

Unified Diff: chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h

Issue 11038063: Support chrome_to_mobile job receiving Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix format Created 8 years, 1 month 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: chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h
diff --git a/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h b/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ed436bea1fbeeacdf61d93acc8b28ca7f4a9b36
--- /dev/null
+++ b/chrome/browser/chrome_to_mobile/common/cloud_print_request_factory.h
@@ -0,0 +1,36 @@
+// Copyright 2012 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 CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_
+#define CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_
+
+#include <string>
+
+#include "chrome/browser/chrome_to_mobile/common/cloud_print_request.h"
+#include "googleurl/src/gurl.h"
+
+namespace chrome_to_mobile {
+
+// |CloudPrintRequestFactory| is intended for testing.
+// |CloudPrintRequest::CreateAndStart()| uses the currently registered Factory
+// to create requests if there is any. Otherwise it creates
+// |CloudPrintRequestImpl|s.
+class CloudPrintRequestFactory {
+ public:
+ virtual CloudPrintRequest* CreateAndStart(
+ const GURL& url,
+ const std::string& additional_header,
+ const net::URLFetcher::RequestType& request_type,
+ const std::string& post_data_mime_type,
+ const std::string& post_data,
+ const CloudPrintRequest::Settings& settings,
+ CloudPrintRequest::Delegate* delegate) = 0;
+
+ protected:
+ virtual ~CloudPrintRequestFactory() {}
+};
+
+} // namespace chrome_to_mobile
+
+#endif // CHROME_BROWSER_CHROME_TO_MOBILE_COMMON_CLOUD_PRINT_REQUEST_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698