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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/extensions/file_browser_action.h"
6
7 #include "chrome/common/extensions/url_pattern.h"
8 #include "googleurl/src/gurl.h"
9
10 FileBrowserAction::FileBrowserAction() {
11 }
12
13
14 FileBrowserAction::~FileBrowserAction() {
15 }
16
17 void FileBrowserAction::AddPattern(const URLPattern& pattern) {
18 patterns_.push_back(pattern);
19 }
20
21 void FileBrowserAction::ClearPatterns() {
22 patterns_.clear();
23 }
24
25 bool FileBrowserAction::MatchesURL(const GURL& url) const {
26 for (PatternList::const_iterator pattern = patterns_.begin();
27 pattern != patterns_.end(); ++pattern) {
28 if (pattern->MatchesUrl(url))
29 return true;
30 }
31 return false;
32 }
33
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698