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

Side by Side Diff: components/history/core/test/history_backend_db_base_test.cc

Issue 2107493002: Offer user to send feedback from profile error dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting's & droger's Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/history/core/test/history_backend_db_base_test.h" 5 #include "components/history/core/test/history_backend_db_base_test.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 12 matching lines...) Expand all
23 23
24 namespace history { 24 namespace history {
25 25
26 // Delegate class for when we create a backend without a HistoryService. 26 // Delegate class for when we create a backend without a HistoryService.
27 class BackendDelegate : public HistoryBackend::Delegate { 27 class BackendDelegate : public HistoryBackend::Delegate {
28 public: 28 public:
29 explicit BackendDelegate(HistoryBackendDBBaseTest* history_test) 29 explicit BackendDelegate(HistoryBackendDBBaseTest* history_test)
30 : history_test_(history_test) {} 30 : history_test_(history_test) {}
31 31
32 // HistoryBackend::Delegate implementation. 32 // HistoryBackend::Delegate implementation.
33 void NotifyProfileError(sql::InitStatus init_status) override { 33 void NotifyProfileError(sql::InitStatus init_status,
34 const std::string& diagnostics) override {
34 history_test_->last_profile_error_ = init_status; 35 history_test_->last_profile_error_ = init_status;
35 } 36 }
36 void SetInMemoryBackend( 37 void SetInMemoryBackend(
37 std::unique_ptr<InMemoryHistoryBackend> backend) override { 38 std::unique_ptr<InMemoryHistoryBackend> backend) override {
38 // Save the in-memory backend to the history test object, this happens 39 // Save the in-memory backend to the history test object, this happens
39 // synchronously, so we don't have to do anything fancy. 40 // synchronously, so we don't have to do anything fancy.
40 history_test_->in_mem_backend_.swap(backend); 41 history_test_->in_mem_backend_.swap(backend);
41 } 42 }
42 void NotifyFaviconsChanged(const std::set<GURL>& page_urls, 43 void NotifyFaviconsChanged(const std::set<GURL>& page_urls,
43 const GURL& icon_url) override {} 44 const GURL& icon_url) override {}
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 GURL("http://tab-url.example.com/"), 133 GURL("http://tab-url.example.com/"),
133 GURL("http://tab-referrer-url.example.com/"), std::string(), 134 GURL("http://tab-referrer-url.example.com/"), std::string(),
134 "application/vnd.oasis.opendocument.text", "application/octet-stream", 135 "application/vnd.oasis.opendocument.text", "application/octet-stream",
135 time, time, std::string(), std::string(), 0, 512, state, 136 time, time, std::string(), std::string(), 0, 512, state,
136 DownloadDangerType::NOT_DANGEROUS, kTestDownloadInterruptReasonNone, 137 DownloadDangerType::NOT_DANGEROUS, kTestDownloadInterruptReasonNone,
137 std::string(), id, guid, false, "by_ext_id", "by_ext_name"); 138 std::string(), id, guid, false, "by_ext_id", "by_ext_name");
138 return db_->CreateDownload(download); 139 return db_->CreateDownload(download);
139 } 140 }
140 141
141 } // namespace history 142 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698