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

Side by Side Diff: chrome/browser/history/in_memory_history_backend.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/browser/history/in_memory_history_backend.h" 5 #include "chrome/browser/history/in_memory_history_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/history/history_notifications.h" 14 #include "chrome/browser/history/history_notifications.h"
15 #include "chrome/browser/history/in_memory_database.h" 15 #include "chrome/browser/history/in_memory_database.h"
16 #include "chrome/browser/history/url_database.h" 16 #include "chrome/browser/history/url_database.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
19 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
21 21
22 namespace history { 22 namespace history {
23 23
24 InMemoryHistoryBackend::InMemoryHistoryBackend() 24 InMemoryHistoryBackend::InMemoryHistoryBackend()
25 : profile_(NULL) { 25 : profile_(NULL) {
26 } 26 }
27 27
28 InMemoryHistoryBackend::~InMemoryHistoryBackend() {} 28 InMemoryHistoryBackend::~InMemoryHistoryBackend() {}
29 29
30 bool InMemoryHistoryBackend::Init(const FilePath& history_filename, 30 bool InMemoryHistoryBackend::Init(const base::FilePath& history_filename,
31 URLDatabase* db) { 31 URLDatabase* db) {
32 db_.reset(new InMemoryDatabase); 32 db_.reset(new InMemoryDatabase);
33 return db_->InitFromDisk(history_filename); 33 return db_->InitFromDisk(history_filename);
34 } 34 }
35 35
36 void InMemoryHistoryBackend::AttachToHistoryService(Profile* profile) { 36 void InMemoryHistoryBackend::AttachToHistoryService(Profile* profile) {
37 if (!db_.get()) { 37 if (!db_.get()) {
38 NOTREACHED(); 38 NOTREACHED();
39 return; 39 return;
40 } 40 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) { 170 bool InMemoryHistoryBackend::HasKeyword(const GURL& url) {
171 URLID id = db_->GetRowForURL(url, NULL); 171 URLID id = db_->GetRowForURL(url, NULL);
172 if (!id) 172 if (!id)
173 return false; 173 return false;
174 174
175 return db_->GetKeywordSearchTermRow(id, NULL); 175 return db_->GetKeywordSearchTermRow(id, NULL);
176 } 176 }
177 177
178 } // namespace history 178 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.h ('k') | chrome/browser/history/thumbnail_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698