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

Unified Diff: components/offline_pages/content/background_loader/background_loader_contents_stub.h

Issue 2534673002: [Offline pages] Create offliner that uses background loader (Closed)
Patch Set: bleh it works now Created 4 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/offline_pages/content/background_loader/background_loader_contents_stub.h
diff --git a/components/offline_pages/content/background_loader/background_loader_contents_stub.h b/components/offline_pages/content/background_loader/background_loader_contents_stub.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b13baba1ac073423b5e9357c66044e2ee31d936
--- /dev/null
+++ b/components/offline_pages/content/background_loader/background_loader_contents_stub.h
@@ -0,0 +1,31 @@
+// Copyright 2016 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_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CONTENTS_STUB_H_
+#define COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CONTENTS_STUB_H_
+
+#include "components/offline_pages/content/background_loader/background_loader_contents.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace background_loader {
+
+// Stub BackgroundLoaderContents for testing use.
+class BackgroundLoaderContentsStub : public BackgroundLoaderContents {
+ public:
+ BackgroundLoaderContentsStub(content::BrowserContext* browser_context);
+ ~BackgroundLoaderContentsStub() override;
+
+ void LoadPage(const GURL& url) override;
+ bool is_loading() const { return is_loading_; }
+
+ private:
+ bool is_loading_;
+ DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderContentsStub);
+};
+
+} // namespace background_loader
+#endif // COMPONENTS_OFFLINE_PAGES_CONTENT_BACKGROUND_LOADER_BACKGROUND_LOADER_CONTENTS_STUB_H_

Powered by Google App Engine
This is Rietveld 408576698