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

Unified Diff: chrome/browser/storage/durable_storage_permission_context.h

Issue 1356813002: Autogrant the durable storage permission to bookmarked origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check that bookmark model exists before using it Created 5 years, 3 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: chrome/browser/storage/durable_storage_permission_context.h
diff --git a/chrome/browser/storage/durable_storage_permission_context.h b/chrome/browser/storage/durable_storage_permission_context.h
index 58757498ac3cc587abd6d3f8eb9b5b7b6c6e01b7..21a1b933d9be55df515d3fff224f5b36980710dc 100644
--- a/chrome/browser/storage/durable_storage_permission_context.h
+++ b/chrome/browser/storage/durable_storage_permission_context.h
@@ -5,15 +5,28 @@
#ifndef CHROME_BROWSER_STORAGE_DURABLE_STORAGE_PERMISSION_CONTEXT_H_
#define CHROME_BROWSER_STORAGE_DURABLE_STORAGE_PERMISSION_CONTEXT_H_
+#include <vector>
+
#include "chrome/browser/permissions/permission_context_base.h"
+#include "components/bookmarks/browser/bookmark_model.h"
class DurableStoragePermissionContext : public PermissionContextBase {
public:
explicit DurableStoragePermissionContext(Profile* profile);
~DurableStoragePermissionContext() override = default;
+ void DecidePermission(content::WebContents* web_contents,
+ const PermissionRequestID& id,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin,
+ bool user_gesture,
+ const BrowserPermissionCallback& callback) override;
bool IsRestrictedToSecureOrigins() const override;
+ static bool IsOriginBookmarked(
jsbell 2015/09/21 17:22:53 Only exposed for testing? If so, make it private a
dgrogan 2015/09/24 20:58:57 Done.
+ const std::vector<bookmarks::BookmarkModel::URLAndTitle>& bookmarks,
+ const GURL& origin);
+
private:
DISALLOW_COPY_AND_ASSIGN(DurableStoragePermissionContext);
};

Powered by Google App Engine
This is Rietveld 408576698