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

Side by Side Diff: content/browser/net/sqlite_persistent_cookie_store.cc

Issue 102873002: Move GetFileSize, NormalizeFilePath to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "content/browser/net/sqlite_persistent_cookie_store.h" 5 #include "content/browser/net/sqlite_persistent_cookie_store.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 } 542 }
543 543
544 base::Time start = base::Time::Now(); 544 base::Time start = base::Time::Now();
545 545
546 const base::FilePath dir = path_.DirName(); 546 const base::FilePath dir = path_.DirName();
547 if (!base::PathExists(dir) && !base::CreateDirectory(dir)) { 547 if (!base::PathExists(dir) && !base::CreateDirectory(dir)) {
548 return false; 548 return false;
549 } 549 }
550 550
551 int64 db_size = 0; 551 int64 db_size = 0;
552 if (file_util::GetFileSize(path_, &db_size)) 552 if (base::GetFileSize(path_, &db_size))
553 UMA_HISTOGRAM_COUNTS("Cookie.DBSizeInKB", db_size / 1024 ); 553 UMA_HISTOGRAM_COUNTS("Cookie.DBSizeInKB", db_size / 1024 );
554 554
555 db_.reset(new sql::Connection); 555 db_.reset(new sql::Connection);
556 db_->set_histogram_tag("Cookie"); 556 db_->set_histogram_tag("Cookie");
557 557
558 // Unretained to avoid a ref loop with |db_|. 558 // Unretained to avoid a ref loop with |db_|.
559 db_->set_error_callback( 559 db_->set_error_callback(
560 base::Bind(&SQLitePersistentCookieStore::Backend::DatabaseErrorCallback, 560 base::Bind(&SQLitePersistentCookieStore::Backend::DatabaseErrorCallback,
561 base::Unretained(this))); 561 base::Unretained(this)));
562 562
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 path, 1219 path,
1220 restore_old_session_cookies, 1220 restore_old_session_cookies,
1221 storage_policy, 1221 storage_policy,
1222 cookie_monster_delegate, 1222 cookie_monster_delegate,
1223 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 1223 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
1224 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( 1224 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
1225 BrowserThread::GetBlockingPool()->GetSequenceToken())); 1225 BrowserThread::GetBlockingPool()->GetSequenceToken()));
1226 } 1226 }
1227 1227
1228 } // namespace content 1228 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/tracing/tracing_controller_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698