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

Side by Side Diff: extensions/common/extension_resource.cc

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/extension_resource.h" 5 #include "extensions/common/extension_resource.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 10
11 namespace extensions {
12
11 ExtensionResource::ExtensionResource() : follow_symlinks_anywhere_(false) { 13 ExtensionResource::ExtensionResource() : follow_symlinks_anywhere_(false) {
12 } 14 }
13 15
14 ExtensionResource::ExtensionResource(const std::string& extension_id, 16 ExtensionResource::ExtensionResource(const std::string& extension_id,
15 const base::FilePath& extension_root, 17 const base::FilePath& extension_root,
16 const base::FilePath& relative_path) 18 const base::FilePath& relative_path)
17 : extension_id_(extension_id), 19 : extension_id_(extension_id),
18 extension_root_(extension_root), 20 extension_root_(extension_root),
19 relative_path_(relative_path), 21 relative_path_(relative_path),
20 follow_symlinks_anywhere_(false) { 22 follow_symlinks_anywhere_(false) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Make sure we have a cached value to test against... 115 // Make sure we have a cached value to test against...
114 if (full_resource_path_.empty()) 116 if (full_resource_path_.empty())
115 GetFilePath(); 117 GetFilePath();
116 if (NormalizeSeperators(path.value()) == 118 if (NormalizeSeperators(path.value()) ==
117 NormalizeSeperators(full_resource_path_.value())) { 119 NormalizeSeperators(full_resource_path_.value())) {
118 return true; 120 return true;
119 } else { 121 } else {
120 return false; 122 return false;
121 } 123 }
122 } 124 }
125
126 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension_resource.h ('k') | extensions/common/extension_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698