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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 "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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 if (initialized_ || corruption_detected_) { 539 if (initialized_ || corruption_detected_) {
540 // Return false if we were previously initialized but the DB has since been 540 // Return false if we were previously initialized but the DB has since been
541 // closed, or if corruption caused a database reset during initialization. 541 // closed, or if corruption caused a database reset during initialization.
542 return db_ != NULL; 542 return db_ != NULL;
543 } 543 }
544 544
545 base::Time start = base::Time::Now(); 545 base::Time start = base::Time::Now();
546 546
547 const base::FilePath dir = path_.DirName(); 547 const base::FilePath dir = path_.DirName();
548 if (!file_util::PathExists(dir) && !file_util::CreateDirectory(dir)) { 548 if (!base::PathExists(dir) && !file_util::CreateDirectory(dir)) {
549 return false; 549 return false;
550 } 550 }
551 551
552 int64 db_size = 0; 552 int64 db_size = 0;
553 if (file_util::GetFileSize(path_, &db_size)) 553 if (file_util::GetFileSize(path_, &db_size))
554 UMA_HISTOGRAM_COUNTS("Cookie.DBSizeInKB", db_size / 1024 ); 554 UMA_HISTOGRAM_COUNTS("Cookie.DBSizeInKB", db_size / 1024 );
555 555
556 db_.reset(new sql::Connection); 556 db_.reset(new sql::Connection);
557 db_->set_histogram_tag("Cookie"); 557 db_->set_histogram_tag("Cookie");
558 558
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 1199
1200 const std::string cookie_priority_experiment_group = 1200 const std::string cookie_priority_experiment_group =
1201 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy"); 1201 base::FieldTrialList::FindFullName("CookieRetentionPriorityStudy");
1202 cookie_monster->SetPriorityAwareGarbageCollection( 1202 cookie_monster->SetPriorityAwareGarbageCollection(
1203 cookie_priority_experiment_group == "ExperimentOn"); 1203 cookie_priority_experiment_group == "ExperimentOn");
1204 1204
1205 return cookie_monster; 1205 return cookie_monster;
1206 } 1206 }
1207 1207
1208 } // namespace content 1208 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/encrypted_media_browsertest.cc ('k') | content/browser/plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698