| 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_path.h" | 6 #include "base/file_path.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 std::string urls_string; | 102 std::string urls_string; |
| 103 for (std::vector<GURL>::const_iterator iter = urls.begin(); | 103 for (std::vector<GURL>::const_iterator iter = urls.begin(); |
| 104 iter != urls.end(); ++iter) | 104 iter != urls.end(); ++iter) |
| 105 urls_string.append(iter->spec() + "\n"); | 105 urls_string.append(iter->spec() + "\n"); |
| 106 return urls_string; | 106 return urls_string; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // content::NotificationObserver. | 109 // content::NotificationObserver. |
| 110 virtual void Observe(int type, | 110 virtual void Observe(int type, |
| 111 const content::NotificationSource& source, | 111 const content::NotificationSource& source, |
| 112 const content::NotificationDetails& details) { | 112 const content::NotificationDetails& details) OVERRIDE { |
| 113 switch (type) { | 113 switch (type) { |
| 114 case chrome::NOTIFICATION_BROWSER_CLOSED: | 114 case chrome::NOTIFICATION_BROWSER_CLOSED: |
| 115 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); | 115 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); |
| 116 break; | 116 break; |
| 117 default: | 117 default: |
| 118 NOTREACHED(); | 118 NOTREACHED(); |
| 119 break; | 119 break; |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 ASSERT_EQ(1u, errors.size()); | 385 ASSERT_EQ(1u, errors.size()); |
| 386 | 386 |
| 387 std::string expected_error; | 387 std::string expected_error; |
| 388 expected_error.append("Failed to load the page at: ") | 388 expected_error.append("Failed to load the page at: ") |
| 389 .append(kCacheMissURL) | 389 .append(kCacheMissURL) |
| 390 .append(": The requested entry was not found in the cache."); | 390 .append(": The requested entry was not found in the cache."); |
| 391 | 391 |
| 392 ASSERT_FALSE(errors[0].compare(expected_error)); | 392 ASSERT_FALSE(errors[0].compare(expected_error)); |
| 393 } | 393 } |
| 394 #endif // !defined(OS_CHROMEOS) | 394 #endif // !defined(OS_CHROMEOS) |
| OLD | NEW |