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

Side by Side Diff: webkit/browser/fileapi/obfuscated_file_util.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 "webkit/browser/fileapi/obfuscated_file_util.h" 5 #include "webkit/browser/fileapi/obfuscated_file_util.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 return NULL; 1160 return NULL;
1161 } 1161 }
1162 MarkUsed(); 1162 MarkUsed();
1163 SandboxDirectoryDatabase* database = new SandboxDirectoryDatabase(path); 1163 SandboxDirectoryDatabase* database = new SandboxDirectoryDatabase(path);
1164 directories_[key] = database; 1164 directories_[key] = database;
1165 return database; 1165 return database;
1166 } 1166 }
1167 1167
1168 base::FilePath ObfuscatedFileUtil::GetDirectoryForOrigin( 1168 base::FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
1169 const GURL& origin, bool create, base::PlatformFileError* error_code) { 1169 const GURL& origin, bool create, base::PlatformFileError* error_code) {
1170 if (special_storage_policy_ && 1170 if (special_storage_policy_.get() &&
1171 special_storage_policy_->HasIsolatedStorage(origin)) { 1171 special_storage_policy_->HasIsolatedStorage(origin)) {
1172 CHECK(isolated_origin_.is_empty() || isolated_origin_ == origin) 1172 CHECK(isolated_origin_.is_empty() || isolated_origin_ == origin)
1173 << "multiple origins for an isolated site: " 1173 << "multiple origins for an isolated site: "
1174 << isolated_origin_.spec() << " vs " << origin.spec(); 1174 << isolated_origin_.spec() << " vs " << origin.spec();
1175 isolated_origin_ = origin; 1175 isolated_origin_ = origin;
1176 } 1176 }
1177 1177
1178 if (!InitOriginDatabase(create)) { 1178 if (!InitOriginDatabase(create)) {
1179 if (error_code) { 1179 if (error_code) {
1180 *error_code = create ? 1180 *error_code = create ?
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 // If truncating we need to update the usage. 1383 // If truncating we need to update the usage.
1384 if (error == base::PLATFORM_FILE_OK && delta) { 1384 if (error == base::PLATFORM_FILE_OK && delta) {
1385 UpdateUsage(context, url, delta); 1385 UpdateUsage(context, url, delta);
1386 context->change_observers()->Notify( 1386 context->change_observers()->Notify(
1387 &FileChangeObserver::OnModifyFile, MakeTuple(url)); 1387 &FileChangeObserver::OnModifyFile, MakeTuple(url));
1388 } 1388 }
1389 return error; 1389 return error;
1390 } 1390 }
1391 1391
1392 } // namespace fileapi 1392 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/local_file_util_unittest.cc ('k') | webkit/browser/fileapi/obfuscated_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698