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

Side by Side Diff: chrome/common/extensions/file_browser_handler.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
« no previous file with comments | « chrome/common/extensions/file_browser_handler.h ('k') | chrome/common/extensions/url_pattern.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_handler.h"
6
7 #include "chrome/common/extensions/url_pattern.h"
8 #include "googleurl/src/gurl.h"
9
10 FileBrowserHandler::FileBrowserHandler() {
11 }
12
13 FileBrowserHandler::~FileBrowserHandler() {
14 }
15
16 void FileBrowserHandler::AddPattern(const URLPattern& pattern) {
17 patterns_.push_back(pattern);
18 }
19
20 void FileBrowserHandler::ClearPatterns() {
21 patterns_.clear();
22 }
23
24 bool FileBrowserHandler::MatchesURL(const GURL& url) const {
25 for (PatternList::const_iterator pattern = patterns_.begin();
26 pattern != patterns_.end(); ++pattern) {
27 if (pattern->MatchesUrl(url))
28 return true;
29 }
30 return false;
31 }
32
OLDNEW
« no previous file with comments | « chrome/common/extensions/file_browser_handler.h ('k') | chrome/common/extensions/url_pattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698