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

Unified Diff: components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h

Issue 684223003: Data Reduction Proxy Interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding tests and addressing comments Created 6 years 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: components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h b/components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..351def4683b0d8b06b4ed9632f100cc80dc3eb75
--- /dev/null
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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 COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_DATA_REDUCTION_PROXY_UI_SERVICE_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_DATA_REDUCTION_PROXY_UI_SERVICE_H_
+
+#include "base/memory/scoped_ptr.h"
bengr 2014/12/29 18:45:42 Not needed. But you do need "base/memory/ref_count
megjablon 2014/12/30 23:40:01 Done.
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_manager.h"
bengr 2014/12/29 18:45:42 Can this be forward declared?
megjablon 2014/12/30 23:40:01 Done.
+
+namespace net {
+class ProxyConfig;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyUIService {
+ public:
+ typedef base::Callback<const net::ProxyConfig&()> ProxyConfigGetter;
bengr 2014/12/29 18:45:42 This is defined in DRPNetworkDelegate, no? If so,
megjablon 2014/12/30 23:40:01 Done.
+
+ DataReductionProxyUIService();
+ virtual ~DataReductionProxyUIService();
+
+ void set_proxy_config_getter(const ProxyConfigGetter& getter);
+ // Virtual for testing.
+ virtual const net::ProxyConfig& data_reduction_proxy_config() const;
+
+ const scoped_refptr<DataReductionProxyUIManager>& ui_manager() const;
bengr 2014/12/29 18:45:42 Do you really need a scoped_refptr? Would a scoped
megjablon 2014/12/30 23:40:01 The ui manager is a ref counted object since we in
+
+ private:
+ // The UI manager handles showing interstitials. Accessed on both UI and IO
+ // thread.
+ scoped_refptr<DataReductionProxyUIManager> ui_manager_;
+ ProxyConfigGetter proxy_config_getter_;
bengr 2014/12/29 18:45:42 #include DRPNetworkDelegate
megjablon 2014/12/30 23:40:01 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyUIService);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_CONTENT_DATA_REDUCTION_PROXY_UI_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698