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

Unified Diff: chrome/common/extensions/file_browser_action.cc

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/common/extensions/file_browser_action.cc
===================================================================
--- chrome/common/extensions/file_browser_action.cc (revision 0)
+++ chrome/common/extensions/file_browser_action.cc (revision 0)
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 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.
+
+#include "chrome/common/extensions/file_browser_action.h"
+
+#include "chrome/common/extensions/url_pattern.h"
+#include "googleurl/src/gurl.h"
+
+FileBrowserAction::FileBrowserAction() {
+}
+
+
+FileBrowserAction::~FileBrowserAction() {
+}
+
+void FileBrowserAction::AddPattern(const URLPattern& pattern) {
+ patterns_.push_back(pattern);
+}
+
+void FileBrowserAction::ClearPatterns() {
+ patterns_.clear();
+}
+
+bool FileBrowserAction::MatchesURL(const GURL& url) const {
+ for (PatternList::const_iterator pattern = patterns_.begin();
+ pattern != patterns_.end(); ++pattern) {
+ if (pattern->MatchesUrl(url))
+ return true;
+ }
+ return false;
+}
+
Property changes on: chrome/common/extensions/file_browser_action.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698