OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 urls_string.append(iter->spec() + "\n"); | 110 urls_string.append(iter->spec() + "\n"); |
111 return urls_string; | 111 return urls_string; |
112 } | 112 } |
113 | 113 |
114 // content::NotificationObserver. | 114 // content::NotificationObserver. |
115 virtual void Observe(int type, | 115 virtual void Observe(int type, |
116 const content::NotificationSource& source, | 116 const content::NotificationSource& source, |
117 const content::NotificationDetails& details) OVERRIDE { | 117 const content::NotificationDetails& details) OVERRIDE { |
118 switch (type) { | 118 switch (type) { |
119 case chrome::NOTIFICATION_BROWSER_CLOSED: | 119 case chrome::NOTIFICATION_BROWSER_CLOSED: |
120 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); | 120 base::MessageLoop::current()->PostTask( |
| 121 FROM_HERE, base::MessageLoop::QuitClosure()); |
121 break; | 122 break; |
122 default: | 123 default: |
123 NOTREACHED(); | 124 NOTREACHED(); |
124 break; | 125 break; |
125 } | 126 } |
126 } | 127 } |
127 | 128 |
128 base::FilePath urls_file() { return urls_file_; } | 129 base::FilePath urls_file() { return urls_file_; } |
129 base::FilePath errors_file() { return errors_file_; } | 130 base::FilePath errors_file() { return errors_file_; } |
130 base::FilePath stats_file() { return stats_file_; } | 131 base::FilePath stats_file() { return stats_file_; } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 ASSERT_EQ(1u, errors.size()); | 397 ASSERT_EQ(1u, errors.size()); |
397 | 398 |
398 std::string expected_error; | 399 std::string expected_error; |
399 expected_error.append("Failed to load the page at: ") | 400 expected_error.append("Failed to load the page at: ") |
400 .append(kCacheMissURL) | 401 .append(kCacheMissURL) |
401 .append(": The requested entry was not found in the cache."); | 402 .append(": The requested entry was not found in the cache."); |
402 | 403 |
403 ASSERT_FALSE(errors[0].compare(expected_error)); | 404 ASSERT_FALSE(errors[0].compare(expected_error)); |
404 } | 405 } |
405 #endif // !defined(OS_CHROMEOS) | 406 #endif // !defined(OS_CHROMEOS) |
OLD | NEW |