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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_database.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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/browser/extensions/activity_log/activity_database.h" 5 #include "chrome/browser/extensions/activity_log/activity_database.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 25 matching lines...) Expand all
36 // records, but not so large that too much space can be tied up holding records 36 // records, but not so large that too much space can be tied up holding records
37 // in memory. 37 // in memory.
38 static const int kSizeThresholdForFlush = 200; 38 static const int kSizeThresholdForFlush = 200;
39 39
40 ActivityDatabase::ActivityDatabase(ActivityDatabase::Delegate* delegate) 40 ActivityDatabase::ActivityDatabase(ActivityDatabase::Delegate* delegate)
41 : delegate_(delegate), 41 : delegate_(delegate),
42 valid_db_(false), 42 valid_db_(false),
43 batch_mode_(true), 43 batch_mode_(true),
44 already_closed_(false), 44 already_closed_(false),
45 did_init_(false) { 45 did_init_(false) {
46 if (CommandLine::ForCurrentProcess()->HasSwitch( 46 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
47 switches::kEnableExtensionActivityLogTesting)) { 47 switches::kEnableExtensionActivityLogTesting)) {
48 batching_period_ = base::TimeDelta::FromSeconds(10); 48 batching_period_ = base::TimeDelta::FromSeconds(10);
49 } else { 49 } else {
50 batching_period_ = base::TimeDelta::FromMinutes(2); 50 batching_period_ = base::TimeDelta::FromMinutes(2);
51 } 51 }
52 } 52 }
53 53
54 ActivityDatabase::~ActivityDatabase() {} 54 ActivityDatabase::~ActivityDatabase() {}
55 55
56 void ActivityDatabase::Init(const base::FilePath& db_name) { 56 void ActivityDatabase::Init(const base::FilePath& db_name) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 field_types[i]); 229 field_types[i]);
230 if (!db->Execute(table_updater.c_str())) 230 if (!db->Execute(table_updater.c_str()))
231 return false; 231 return false;
232 } 232 }
233 } 233 }
234 } 234 }
235 return true; 235 return true;
236 } 236 }
237 237
238 } // namespace extensions 238 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | chrome/browser/extensions/activity_log/activity_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698