| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 } | 279 } |
| 280 | 280 |
| 281 ProfileSyncService* service() { | 281 ProfileSyncService* service() { |
| 282 return service_.get(); | 282 return service_.get(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 ProfileSyncComponentsFactoryMock* components_factory() { | 285 ProfileSyncComponentsFactoryMock* components_factory() { |
| 286 return components_factory_; | 286 return components_factory_; |
| 287 } | 287 } |
| 288 | 288 |
| 289 void ClearBrowsingDataCallback(Profile* profile, base::Time start, | 289 void ClearBrowsingDataCallback(BrowsingDataRemover::Observer* observer, |
| 290 Profile* profile, |
| 291 base::Time start, |
| 290 base::Time end) { | 292 base::Time end) { |
| 291 EXPECT_EQ(profile_, profile); | 293 EXPECT_EQ(profile_, profile); |
| 292 clear_browsing_date_start_ = start; | 294 clear_browsing_date_start_ = start; |
| 293 } | 295 } |
| 294 | 296 |
| 295 protected: | 297 protected: |
| 296 void PumpLoop() { | 298 void PumpLoop() { |
| 297 base::RunLoop run_loop; | 299 base::RunLoop run_loop; |
| 298 base::MessageLoop::current()->PostTask( | 300 base::MessageLoop::current()->PostTask( |
| 299 FROM_HERE, run_loop.QuitClosure()); | 301 FROM_HERE, run_loop.QuitClosure()); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 // See that we can override the URL with a flag. | 609 // See that we can override the URL with a flag. |
| 608 CommandLine command_line( | 610 CommandLine command_line( |
| 609 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); | 611 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); |
| 610 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); | 612 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); |
| 611 EXPECT_EQ("https://foo/bar", | 613 EXPECT_EQ("https://foo/bar", |
| 612 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | 614 ProfileSyncService::GetSyncServiceURL(command_line).spec()); |
| 613 } | 615 } |
| 614 | 616 |
| 615 } // namespace | 617 } // namespace |
| 616 } // namespace browser_sync | 618 } // namespace browser_sync |
| OLD | NEW |